Skip to content

Commit

Permalink
.net 9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
dhindrik committed Nov 15, 2024
1 parent df4baf3 commit 900c4ee
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 58 deletions.
42 changes: 23 additions & 19 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,32 @@ name: PR

on:
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Install Maui
run: dotnet workload install maui

- name: Restore dependencies
run: dotnet restore TinyInsights/TinyInsights.csproj

- name: Build
run: dotnet build TinyInsights/TinyInsights.csproj --no-restore

- name: Pack
run: dotnet pack TinyInsights/TinyInsights.csproj
- uses: actions/checkout@v4
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Install Maui
run: dotnet workload install maui

- name: Restore dependencies
run: dotnet restore TinyInsights/TinyInsights.csproj

- name: Build
run: dotnet build TinyInsights/TinyInsights.csproj --no-restore

- name: Pack
run: dotnet pack TinyInsights/TinyInsights.csproj
47 changes: 26 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,32 @@ on:

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Install Maui
run: dotnet workload install maui

- name: Restore dependencies
run: dotnet restore TinyInsights/TinyInsights.csproj

- name: Build
run: dotnet build TinyInsights/TinyInsights.csproj --no-restore

- name: Pack
run: dotnet pack TinyInsights/TinyInsights.csproj -p:PackageVersion=${{ github.ref_name }}

- name: Push
run: dotnet nuget push '**/*.nupkg' --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
- uses: actions/checkout@v4

- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Setup .NET 9.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Install Maui
run: dotnet workload install maui

- name: Restore dependencies
run: dotnet restore TinyInsights/TinyInsights.csproj

- name: Build
run: dotnet build TinyInsights/TinyInsights.csproj --no-restore

- name: Pack
run: dotnet pack TinyInsights/TinyInsights.csproj -p:PackageVersion=${{ github.ref_name }}

- name: Push
run: dotnet nuget push '**/*.nupkg' --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
10 changes: 5 additions & 5 deletions TinyInsights.TestApp/TinyInsights.TestApp.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net9.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->

Expand Down Expand Up @@ -59,9 +59,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.92" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.92" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.10" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.10" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
12 changes: 6 additions & 6 deletions TinyInsights.Web/TinyInsights.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.4" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Radzen.Blazor" Version="5.2.9" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
<PackageReference Include="Radzen.Blazor" Version="5.6.0" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions TinyInsights.WebServer/TinyInsights.WebServer.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand All @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Web.UI" Version="3.1.0" />
<PackageReference Include="Microsoft.Identity.Web.UI" Version="3.3.1" />
</ItemGroup>

</Project>
18 changes: 13 additions & 5 deletions TinyInsights/TinyInsights.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios;net8.0-maccatalyst;net9.0;net9.0-android;net9.0-ios;net9.0-maccatalyst;</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0;net9.0-windows10.0.19041.0</TargetFrameworks>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -27,9 +27,17 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.92"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.92"/>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('net8')) ">
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.100"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.100"/>
</ItemGroup>

<ItemGroup Condition=" $(TargetFramework.StartsWith('net9')) ">
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.10"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.10"/>
</ItemGroup>

</Project>

0 comments on commit 900c4ee

Please sign in to comment.