Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to .NET 9 #12

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- '**.razor'

env:
DOTNET_VERSION: '8.0.x' # The .NET SDK version to use
DOTNET_VERSION: '9.0.x' # The .NET SDK version to use

jobs:
build:
Expand Down
17 changes: 8 additions & 9 deletions Finish/MonkeyFinderHybrid/MonkeyFinderHybrid.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<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> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
Expand Down Expand Up @@ -61,12 +61,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AlohaKit" Version="1.0.74" />
<PackageReference Include="AlohaKit" Version="1.0.100" />
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.82" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.82" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.82" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.10.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.*-*" />
</ItemGroup>
</Project>
2 changes: 0 additions & 2 deletions Finish/MonkeyFinderHybrid/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
<a class="dismiss">🗙</a>
</div>

<script app-name="MonkeyFinderHybrid"
src="./_content/Microsoft.FluentUI.AspNetCore.Components/js/initializersLoader.webview.js"></script>
<script src="_framework/blazor.webview.js" autostart="false"></script>

<fluent-design-theme mode="light" primary-color="#ffc107" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<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> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
Expand Down Expand Up @@ -61,9 +61,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.82" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.82" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.82" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.*-*" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<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> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
Expand Down Expand Up @@ -61,10 +61,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.82" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.82" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.82" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.10.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.*-*" />
</ItemGroup>
</Project>
13 changes: 0 additions & 13 deletions Part 2 - Add Monkey Dialog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,6 @@ Find the **wwwroot** folder, with the **index.html** file inside:
</picture>
</p>

1. Open the **index.html** file and find the below line

```html
<script src="_framework/blazor.webview.js" autostart="false"></script>
```

Right above this line, add the initialization line for the Fluent UI Blazor library as seen below. You want to make sure that the value of the `app-name` attribute matches the assembly name of your application. Typically this is the same as the name of your C# project, in our case MonkeyFinderHybrid.

```html
<script app-name="MonkeyFinderHybrid" src="./_content/Microsoft.FluentUI.AspNetCore.Components/js/initializersLoader.webview.js"></script>
<script src="_framework/blazor.webview.js" autostart="false"></script>
```

1. In **MauiProgram.cs**, we're going to add a call to the `AddFluentUIComponents()` method which will initialize the components in this library. To do this, add the following line:

```csharp
Expand Down
17 changes: 8 additions & 9 deletions Part 3 - Navigation/MonkeyFinderHybrid/MonkeyFinderHybrid.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<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> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
Expand Down Expand Up @@ -61,11 +61,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AlohaKit" Version="1.0.74" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.82" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.82" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.82" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="AlohaKit" Version="1.0.100" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.10.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.*-*" />
</ItemGroup>
</Project>
2 changes: 0 additions & 2 deletions Part 3 - Navigation/MonkeyFinderHybrid/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
<a class="dismiss">🗙</a>
</div>

<script app-name="MonkeyFinderHybrid"
src="./_content/Microsoft.FluentUI.AspNetCore.Components/js/initializersLoader.webview.js"></script>
<script src="_framework/blazor.webview.js" autostart="false"></script>

</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<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> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
Expand Down Expand Up @@ -58,11 +58,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AlohaKit" Version="1.0.74" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.82" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.82" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.82" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="AlohaKit" Version="1.0.100" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.10.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.*-*" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
<a class="dismiss">🗙</a>
</div>

<script app-name="MonkeyFinderHybrid"
src="./_content/Microsoft.FluentUI.AspNetCore.Components/js/initializersLoader.webview.js"></script>
<script src="_framework/blazor.webview.js" autostart="false"></script>

</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<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> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
Expand Down Expand Up @@ -61,12 +61,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AlohaKit" Version="1.0.74" />
<PackageReference Include="AlohaKit" Version="1.0.100" />
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.82" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.82" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.82" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.10.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.*-*" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
<a class="dismiss">🗙</a>
</div>

<script app-name="MonkeyFinderHybrid"
src="./_content/Microsoft.FluentUI.AspNetCore.Components/js/initializersLoader.webview.js"></script>
<script src="_framework/blazor.webview.js" autostart="false"></script>

</body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<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> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net9.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
Expand Down Expand Up @@ -61,12 +61,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AlohaKit" Version="1.0.74" />
<PackageReference Include="AlohaKit" Version="1.0.100" />
<PackageReference Include="CommunityToolkit.Maui" Version="9.1.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.9.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.82" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.82" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.82" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.10.3" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.*-*" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>

<script app-name="MonkeyFinderHybrid" src="./_content/Microsoft.FluentUI.AspNetCore.Components/js/initializersLoader.webview.js"></script>

<script src="_framework/blazor.webview.js" autostart="false"></script>

<fluent-design-theme mode="light" primary-color="#ffc107" />
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Today we will build a [Blazor Hybrid](https://learn.microsoft.com/aspnet/core/bl

## Setup Guide

Hey there! This workshop will be a hands on and a bring your own device workshop. You can develop on PC or Mac and all you will need to do is install [Visual Studio](https://visualstudio.microsoft.com/downloads/) or [Visual Studio Code](https://code.visualstudio.com/Download) with the .NET MAUI workload and/or .NET MAUI extension. The workshop sample application is built on .NET 8, which means you will need at least version 17.8 of Visual Studio 2022 or newer. If you're using Visual Studio Code, or another code editor, make sure to have the [latest .NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) installed, also with the .NET MAUI workload.
Hey there! This workshop will be a hands on and a bring your own device workshop. You can develop on PC or Mac and all you will need to do is install [Visual Studio](https://visualstudio.microsoft.com/downloads/) or [Visual Studio Code](https://code.visualstudio.com/Download) with the .NET MAUI workload and/or .NET MAUI extension. The workshop sample application is built on .NET 9, which means you will need at least version 17.12 of Visual Studio 2022 or newer. If you're using Visual Studio Code, or another code editor, make sure to have the [latest .NET 9 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) installed, also with the .NET MAUI workload.

Before starting the workshop, I recommend going through the quick 10 minute [.NET MAUI Blazor Hybrid Tutorial](https://learn.microsoft.com/aspnet/core/blazor/hybrid/tutorials/maui) that will guide you through installation and also ensuring everything is configured correct.

Expand Down