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 Nimble / Spright Blazor to .NET 8 #2454

Merged
merged 19 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from 9 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
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ To submit changes to Nimble, the first step is to build the monorepo which requi
- Sync down a copy of the nimble repository
- Note: For one-off small contributions you can consider using a fork-pull workflow. However [fork-pull workflows are not yet supported](https://github.com/ni/nimble/issues/634) for substantial development. For substantial development you should be added as a Contributor to the repository. See the [`README.md` Community section](/README.md#community) to get in touch if you need Contributor permissions.
- Install Node.js version 22+ (run `node --version`) and npm version 10+ (run `npm --version`) which can be downloaded from https://nodejs.org/en/download/
- Install .NET 6 SDK (`6.0.418 <= version < 7`) which can be downloaded from https://dotnet.microsoft.com/en-us/download
- Run `dotnet --info` to verify the required version of the SDK is installed. A `v6` install is required, but it's fine if later versions are installed too.
- Install .NET 8 SDK (`8.0.403` or higher) which can be downloaded from https://dotnet.microsoft.com/en-us/download
- Run `dotnet --info` to verify the required version of the SDK is installed. A `v8` install is required, but it's fine if later versions are installed too.

From the `nimble` directory:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
msmithNI marked this conversation as resolved.
Show resolved Hide resolved
"type": "major",
"comment": "Nimble Blazor targets (and requires) .NET 8. Update examples, docs, tests. See README for updated usage instructions.",
"packageName": "@ni/nimble-blazor",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "major",
"comment": "Spright Blazor targets (and requires) .NET 8. Update examples, docs, tests. See README for updated usage instructions.",
"packageName": "@ni/spright-blazor",
"email": "[email protected]",
"dependentChangeType": "patch"
}
18 changes: 17 additions & 1 deletion packages/blazor-workspace/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ dotnet_diagnostic.IDE0066.severity = none
# Disable general pattern matching rule for now, may opt in in the future
dotnet_diagnostic.IDE0078.severity = none

# Disabled during .NET 8 updates
dotnet_diagnostic.IDE0005.severity = suggestion
dotnet_diagnostic.IDE0100.severity = none
dotnet_diagnostic.IDE0200.severity = none
dotnet_diagnostic.IDE0300.severity = none
dotnet_diagnostic.IDE0290.severity = none
dotnet_diagnostic.IDE0028.severity = none
dotnet_diagnostic.IDE0301.severity = none
dotnet_diagnostic.IDE0090.severity = none
dotnet_diagnostic.IDE0028.severity = none
dotnet_diagnostic.BL0007.severity = none
dotnet_diagnostic.SYSLIB1045.severity = none
# dotnet format command throws an exception when IDE0130 (dotnet_style_namespace_match_folder)
# triggers - see https://github.com/dotnet/format/issues/1623
dotnet_diagnostic.IDE0130.severity = suggestion

[*.razor.cs]
# Spurious 'unused' warnings when properties/methods are only used from Razor files
dotnet_diagnostic.IDE0051.severity = none
Expand All @@ -45,7 +61,7 @@ dotnet_diagnostic.IDE0044.severity = none
# Spurious 'unnecessary using' warnings
dotnet_diagnostic.IDE0005.severity = none

[Tests/NimbleBlazor.Tests.Acceptance/Tests/*.cs]
[Tests/NimbleBlazor.Tests.Acceptance/Tests*/*.cs]
dotnet_style_namespace_match_folder = false
# Disable 'Namespace does not match folder structure'
dotnet_diagnostic.IDE0130.severity = none
Expand Down
33 changes: 20 additions & 13 deletions packages/blazor-workspace/BlazorWorkspace.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NimbleBlazor.Tests", "Tests
EndProject
msmithNI marked this conversation as resolved.
Show resolved Hide resolved
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{638B1C16-782F-4C91-A09C-3569957356DF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Client", "Examples\Demo.Client\Demo.Client.csproj", "{A8C1D36B-77FA-4D9B-893E-226FA2786D31}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Client", "Examples\Demo.Client\Demo.Client.csproj", "{63AFFE3B-A427-40B4-8079-CE6E6F1E8223}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Server", "Examples\Demo.Server\Demo.Server.csproj", "{6A1D0B77-BBF2-415E-B3A8-FAB00879F07C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Server", "Examples\Demo.Server\Demo.Server.csproj", "{08919E1A-D277-4F26-A85B-05CC736508BB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Shared", "Examples\Demo.Shared\Demo.Shared.csproj", "{8B6E367C-E472-4E68-98D2-968CFCF6939D}"
EndProject
Expand All @@ -27,7 +27,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SprightBlazor.Tests", "Test
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SprightBlazor.Tests.Acceptance", "Tests\SprightBlazor.Tests.Acceptance\SprightBlazor.Tests.Acceptance.csproj", "{8E335572-CD8B-4879-8760-73416CF103B1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorWorkspace.Testing.Acceptance", "Tests\BlazorWorkspace.Testing.Acceptance\BlazorWorkspace.Testing.Acceptance.csproj", "{D94A4535-51B3-4E70-9582-3F3A44C7A798}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorWorkspace.Testing.Acceptance", "Tests\BlazorWorkspace.Testing.Acceptance\BlazorWorkspace.Testing.Acceptance.csproj", "{D94A4535-51B3-4E70-9582-3F3A44C7A798}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NimbleBlazor.Tests.Acceptance.Client", "Tests\NimbleBlazor.Tests.Acceptance.Client\NimbleBlazor.Tests.Acceptance.Client.csproj", "{27DB8F65-4848-4EA6-A7F2-86EF00D585FD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -43,14 +45,6 @@ Global
{1E11DA86-D43D-4CF7-94F5-B4565450BF4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E11DA86-D43D-4CF7-94F5-B4565450BF4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E11DA86-D43D-4CF7-94F5-B4565450BF4C}.Release|Any CPU.Build.0 = Release|Any CPU
{A8C1D36B-77FA-4D9B-893E-226FA2786D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8C1D36B-77FA-4D9B-893E-226FA2786D31}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8C1D36B-77FA-4D9B-893E-226FA2786D31}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8C1D36B-77FA-4D9B-893E-226FA2786D31}.Release|Any CPU.Build.0 = Release|Any CPU
{6A1D0B77-BBF2-415E-B3A8-FAB00879F07C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A1D0B77-BBF2-415E-B3A8-FAB00879F07C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A1D0B77-BBF2-415E-B3A8-FAB00879F07C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A1D0B77-BBF2-415E-B3A8-FAB00879F07C}.Release|Any CPU.Build.0 = Release|Any CPU
{8B6E367C-E472-4E68-98D2-968CFCF6939D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8B6E367C-E472-4E68-98D2-968CFCF6939D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8B6E367C-E472-4E68-98D2-968CFCF6939D}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -79,20 +73,33 @@ Global
{D94A4535-51B3-4E70-9582-3F3A44C7A798}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D94A4535-51B3-4E70-9582-3F3A44C7A798}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D94A4535-51B3-4E70-9582-3F3A44C7A798}.Release|Any CPU.Build.0 = Release|Any CPU
{27DB8F65-4848-4EA6-A7F2-86EF00D585FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27DB8F65-4848-4EA6-A7F2-86EF00D585FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27DB8F65-4848-4EA6-A7F2-86EF00D585FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27DB8F65-4848-4EA6-A7F2-86EF00D585FD}.Release|Any CPU.Build.0 = Release|Any CPU
{63AFFE3B-A427-40B4-8079-CE6E6F1E8223}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63AFFE3B-A427-40B4-8079-CE6E6F1E8223}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63AFFE3B-A427-40B4-8079-CE6E6F1E8223}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63AFFE3B-A427-40B4-8079-CE6E6F1E8223}.Release|Any CPU.Build.0 = Release|Any CPU
{08919E1A-D277-4F26-A85B-05CC736508BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08919E1A-D277-4F26-A85B-05CC736508BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08919E1A-D277-4F26-A85B-05CC736508BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08919E1A-D277-4F26-A85B-05CC736508BB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{1E11DA86-D43D-4CF7-94F5-B4565450BF4C} = {E5C31FAF-7DEF-494F-A0D2-C9A4875F2132}
{A8C1D36B-77FA-4D9B-893E-226FA2786D31} = {638B1C16-782F-4C91-A09C-3569957356DF}
{6A1D0B77-BBF2-415E-B3A8-FAB00879F07C} = {638B1C16-782F-4C91-A09C-3569957356DF}
{8B6E367C-E472-4E68-98D2-968CFCF6939D} = {638B1C16-782F-4C91-A09C-3569957356DF}
{EAC50129-EF2E-4E7B-98D0-64502E97ED8B} = {638B1C16-782F-4C91-A09C-3569957356DF}
{7C65AEA1-8CA2-48DC-81FE-CE39295BDD4B} = {E5C31FAF-7DEF-494F-A0D2-C9A4875F2132}
{CEA7A89F-CF8E-4128-927E-24CBBF2C8C63} = {E5C31FAF-7DEF-494F-A0D2-C9A4875F2132}
{8E335572-CD8B-4879-8760-73416CF103B1} = {E5C31FAF-7DEF-494F-A0D2-C9A4875F2132}
{D94A4535-51B3-4E70-9582-3F3A44C7A798} = {E5C31FAF-7DEF-494F-A0D2-C9A4875F2132}
{27DB8F65-4848-4EA6-A7F2-86EF00D585FD} = {E5C31FAF-7DEF-494F-A0D2-C9A4875F2132}
{63AFFE3B-A427-40B4-8079-CE6E6F1E8223} = {638B1C16-782F-4C91-A09C-3569957356DF}
{08919E1A-D277-4F26-A85B-05CC736508BB} = {638B1C16-782F-4C91-A09C-3569957356DF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {38E2A588-0714-41E7-9BA3-D89622560FF9}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
Expand All @@ -12,8 +12,8 @@
<Content Remove="packages.lock.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.33" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.33" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.10" PrivateAssets="all" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
Expand All @@ -32,7 +32,7 @@
<None Include="packages.lock.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
<PackageReference Include="NI.CSharp.Analyzers" Version="[2.0.21]" />
<PackageReference Include="NI.CSharp.Analyzers" Version="2.0.27" />
msmithNI marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;

var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<Routes>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");

builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
Expand Down
Loading