Skip to content

Commit

Permalink
Update to .NET 9
Browse files Browse the repository at this point in the history
  • Loading branch information
JimGeersinga committed Nov 12, 2024
1 parent d16f6d9 commit 001499e
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 18 deletions.
11 changes: 8 additions & 3 deletions NED.WoT.BattleResults.Client/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
namespace NED.WoT.BattleResults.Client;

namespace NED.WoT.BattleResults.Client;

public partial class App : Application
{
public App()
{
InitializeComponent();
}

protected override Window CreateWindow(IActivationState? activationState)
{
return new Window(new MainPage()) { Title = "test" };
}

MainPage = new MainPage();
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Router AppAssembly="@typeof(Main).Assembly">
<Router AppAssembly="@typeof(MauiProgram).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<LayoutView Layout="@typeof(Layout.MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using NED.WoT.BattleResults.Client
@using NED.WoT.BattleResults.Client.Shared
@using NED.WoT.BattleResults.Client.Components.Shared
@using NED.WoT.BattleResults.Client.Components.Layout
@using NED.WoT.BattleResults.Client.Components.Pages
@using NED.WoT.BattleResults.Client.Models
@using NED.WoT.BattleResults.Client.Services
@using MudBlazor
2 changes: 1 addition & 1 deletion NED.WoT.BattleResults.Client/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<BlazorWebView HostPage="wwwroot/index.html">
<BlazorWebView.RootComponents>
<RootComponent Selector="#app" ComponentType="{x:Type local:Main}" />
<RootComponent Selector="#app" ComponentType="{x:Type local:Components.Routes}" />
</BlazorWebView.RootComponents>
</BlazorWebView>

Expand Down
11 changes: 9 additions & 2 deletions NED.WoT.BattleResults.Client/MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using MudBlazor.Services;
using Microsoft.Extensions.Logging;

using MudBlazor.Services;

using NED.WoT.BattleResults.Client.Services;

Expand All @@ -11,11 +13,16 @@ public static MauiApp CreateMauiApp()
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts => fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"));
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
});

builder.Services.AddMauiBlazorWebView();

#if DEBUG
builder.Services.AddBlazorWebViewDeveloperTools();
builder.Logging.AddDebug();
#endif

builder.Services.AddMudServices();
Expand Down
14 changes: 7 additions & 7 deletions NED.WoT.BattleResults.Client/NED.WoT.BattleResults.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net8.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net9.0-windows10.0.19041.0</TargetFrameworks>

<OutputType>Exe</OutputType>
<RootNamespace>NED.WoT.BattleResults.Client</RootNamespace>
Expand Down Expand Up @@ -60,13 +60,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.92" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.92" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="8.0.92" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.10" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="$(MauiVersion)" />
<PackageReference Include="MudBlazor" Version="7.15.0" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="System.Text.Json" Version="$(MauiVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">

<Identity Name="maui-package-name-placeholder" Publisher="CN=JimG" Version="1.10.1.0" />
<Identity Name="maui-package-name-placeholder" Publisher="CN=JimG" Version="1.11.0.0" />

<mp:PhoneIdentity PhoneProductId="3DAE7680-3F65-440F-908F-252D648F20FC" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down

0 comments on commit 001499e

Please sign in to comment.