Skip to content

Commit

Permalink
Add .NET 8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
jsakamoto committed Sep 30, 2023
1 parent b4088c0 commit 5c55fe8
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 9 deletions.
3 changes: 3 additions & 0 deletions HotKeys2.E2ETest/HotKeysOnBrowserTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ public class HotKeysOnBrowserTest
public static IEnumerable<HostingModel> AllHostingModels { get; } = new[] {
HostingModel.Wasm60,
HostingModel.Wasm70,
HostingModel.Wasm80,
HostingModel.Server60,
HostingModel.Server70,
HostingModel.Server80,
};

public static IEnumerable<HostingModel> WasmHostingModels { get; } = new[] {
HostingModel.Wasm60,
HostingModel.Wasm70,
HostingModel.Wasm80,
};

[Test]
Expand Down
2 changes: 2 additions & 0 deletions HotKeys2.E2ETest/Internals/HostingModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ public enum HostingModel
{
Wasm60,
Wasm70,
Wasm80,
Server60,
Server70,
Server80,
}
2 changes: 2 additions & 0 deletions HotKeys2.E2ETest/Internals/TestContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ public class TestContext
private readonly IReadOnlyDictionary<HostingModel, SampleSite> SampleSites = new Dictionary<HostingModel, SampleSite> {
{ HostingModel.Wasm60, new SampleSite(5012, "Client", "net6.0") },
{ HostingModel.Wasm70, new SampleSite(5013, "Client", "net7.0") },
{ HostingModel.Wasm80, new SampleSite(5014, "Client", "net8.0") },
{ HostingModel.Server60, new SampleSite(5015, "Server", "net6.0") },
{ HostingModel.Server70, new SampleSite(5016, "Server", "net7.0") },
{ HostingModel.Server80, new SampleSite(5017, "Server", "net8.0") },
};

private IPlaywright? _Playwrite;
Expand Down
2 changes: 1 addition & 1 deletion HotKeys2.E2ETest/Toolbelt.Blazor.HotKeys.E2ETest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
Expand Down
9 changes: 7 additions & 2 deletions HotKeys2/Toolbelt.Blazor.HotKeys2.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>Latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -14,7 +14,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>3.1.0-preview.1</Version>
<Version>3.1.0-preview.2</Version>
<Copyright>Copyright © 2022-2023 J.Sakamoto, Mozilla Public License 2.0</Copyright>
<Authors>J.Sakamoto</Authors>
<RepositoryType>git</RepositoryType>
Expand Down Expand Up @@ -51,6 +51,11 @@
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.0-rc.1.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0-rc.1.*" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="4.8.4">
<PrivateAssets>all</PrivateAssets>
Expand Down
11 changes: 8 additions & 3 deletions SampleSites/Client/SampleSite.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<InvariantGlobalization>true</InvariantGlobalization>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PublishSPAforGitHubPages.Build" Version="2.0.1" />
<PackageReference Include="BlazorWasmPreRendering.Build" Version="1.0.0-preview.28.0" />
<PackageReference Include="PublishSPAforGitHubPages.Build" Version="2.1.0" />
<PackageReference Include="BlazorWasmPreRendering.Build" Version="3.1.0-preview.4" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
Expand All @@ -23,6 +23,11 @@
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0-rc.1.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0-rc.1.*" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Components\SampleSite.Components.csproj" />
</ItemGroup>
Expand Down
8 changes: 6 additions & 2 deletions SampleSites/Components/SampleSite.Components.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -15,8 +15,12 @@
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0-rc.1.*" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Toolbelt.Blazor.HotKeys2" Version="3.1.0-preview.1" />
<PackageReference Include="Toolbelt.Blazor.HotKeys2" Version="3.1.0-preview.2" />
<!--<ProjectReference Include="..\..\HotKeys2\Toolbelt.Blazor.HotKeys2.csproj" />-->
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion SampleSites/Server/SampleSite.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down

0 comments on commit 5c55fe8

Please sign in to comment.