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 .NET9 #5806

Merged
merged 11 commits into from
Nov 13, 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
8 changes: 7 additions & 1 deletion .github/workflows/blazorise-ci-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
with:
dotnet-version: '8.0.x'
include-prerelease: true

- name: Setup .NET 9
uses: actions/setup-dotnet@v3
with:
dotnet-version: '9.0.x'
include-prerelease: true

- name: Restore NuGet Packages
run: dotnet restore
Expand All @@ -38,7 +44,7 @@ jobs:
run: dotnet test ./Tests/Blazorise.Tests/Blazorise.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal

- name: Prepare E2E Tests Dependencies
run: pwsh ./Tests/Blazorise.E2E.Tests/bin/Release/net8.0/playwright.ps1 install --with-deps
run: pwsh ./Tests/Blazorise.E2E.Tests/bin/Release/net9.0/playwright.ps1 install --with-deps

- name: Run E2E Tests - Release
run: dotnet test ./Tests/Blazorise.E2E.Tests/Blazorise.E2E.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal
3 changes: 2 additions & 1 deletion .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
6.0.x
7.0.x
8.0.x
9.0.x

- name: Restore NuGet Packages
run: dotnet restore
Expand All @@ -34,7 +35,7 @@ jobs:
run: dotnet test ./Tests/Blazorise.Tests/Blazorise.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal

- name: Prepare E2E Tests Dependencies
run: pwsh ./Tests/Blazorise.E2E.Tests/bin/Release/net8.0/playwright.ps1 install --with-deps
run: pwsh ./Tests/Blazorise.E2E.Tests/bin/Release/net9.0/playwright.ps1 install --with-deps

- name: Run E2E Tests - Release
run: dotnet test ./Tests/Blazorise.E2E.Tests/Blazorise.E2E.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal
Expand Down
6 changes: 3 additions & 3 deletions Build/Blazorise.Client.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Exe</OutputType>
<LangVersion>11.0</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.*" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.*" PrivateAssets="all" />
</ItemGroup>

</Project>
10 changes: 5 additions & 5 deletions Build/Blazorise.Demo.props
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Library</OutputType>
<IsPackable>true</IsPackable>
<LangVersion>11.0</LangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="9.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.*" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Markdig" Version="0.38.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.*" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.*" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.*" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.*" />
<PackageReference Include="FluentValidation" Version="11.10.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.10.0" />
<PackageReference Include="Flurl.Http" Version="4.0.0-pre2" />
Expand Down
6 changes: 3 additions & 3 deletions Build/Blazorise.Docs.props
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Library</OutputType>
<IsPackable>true</IsPackable>
<LangVersion>11.0</LangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="9.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.*" />
<PackageReference Include="FluentValidation" Version="11.10.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.10.0" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Build/Blazorise.Server.RC.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>11.0</LangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.*" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions Build/Blazorise.Server.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>11.0</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="9.0.*" />
</ItemGroup>

</Project>
17 changes: 11 additions & 6 deletions Build/Blazorise.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Company>Megabit</Company>
<Copyright>Copyright 2018-2024 Megabit</Copyright>

<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<OutputType>Library</OutputType>
<IsPackable>true</IsPackable>
<LangVersion>11.0</LangVersion>
Expand All @@ -27,11 +27,6 @@
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup>
<Content Remove="compilerconfig.json" />
<None Include="compilerconfig.json" />
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<DefineConstants>$(DefineConstants);NET6_0</DefineConstants>
</PropertyGroup>
Expand All @@ -44,6 +39,10 @@
<DefineConstants>$(DefineConstants);NET8_0</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<DefineConstants>$(DefineConstants);NET9_0</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.*" />
Expand All @@ -62,6 +61,12 @@
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.*" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net9.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="9.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.*" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.*" />
</ItemGroup>

<UsingTask
TaskName="ReplaceVersionInJsFiles"
TaskFactory="RoslynCodeTaskFactory"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishUrl>D:\Projects\_releases\Blazorise\antdesign</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<ProjectGuid>39cce894-2049-493f-9b49-2d8b94e4a1b6</ProjectGuid>
<SelfContained>true</SelfContained>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishUrl>D:\Projects\_releases\Blazorise\rcbootstrap</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ProjectGuid>2b39f3d9-4721-4ea7-9272-708238d1208f</ProjectGuid>
<SelfContained>false</SelfContained>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishUrl>D:\Projects\_releases\Blazorise\bootstrap</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<ProjectGuid>36be2535-4cab-4d2d-8ec8-a5396214ea91</ProjectGuid>
<SelfContained>true</SelfContained>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishUrl>D:\Projects\_releases\Blazorise\bootstrap5</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<ProjectGuid>cca627e3-633e-4f00-854c-f028ab298cf5</ProjectGuid>
<SelfContained>true</SelfContained>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishUrl>D:\Projects\_releases\Blazorise\bulma</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<ProjectGuid>71232d47-6012-4fec-a52a-86301faa0ae8</ProjectGuid>
<SelfContained>true</SelfContained>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<ProjectGuid>2c519602-a6e6-4195-9d63-aa34c6978ed2</ProjectGuid>
<SelfContained>true</SelfContained>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<ProjectGuid>4deb65e7-40ba-409e-9c26-6ef75adf2601</ProjectGuid>
<SelfContained>true</SelfContained>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<ProjectGuid>47eeb5b2-3ca1-436c-8317-e69f611fa1e3</ProjectGuid>
<SelfContained>true</SelfContained>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions Documentation/Blazorise.Docs.Generator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
// </summary>
//</member>
var blzSrcPath = @"..\..\..\..\..\Source\Blazorise";
var file = @$"{blzSrcPath}\obj\Debug\net8.0\Blazorise.xml";
var file = @$"{blzSrcPath}\obj\Debug\net9.0\Blazorise.xml";
var enumsFolder = @$"{blzSrcPath}\Enums";
string outputPath = @$"{blzSrcPath}\obj\Debug\net8.0\EnumsOutput.txt";
string outputPath = @$"{blzSrcPath}\obj\Debug\net9.0\EnumsOutput.txt";

var enumsFolderDirectory = new DirectoryInfo( enumsFolder );
var enumFileNames = enumsFolderDirectory.GetFiles().Select( x => x.Name.Split( ".cs" )[0] );
Expand Down
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>
<UserSecretsId>$(MSBuildProjectName)</UserSecretsId>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishUrl>D:\Projects\_releases\Blazorise\docs-v2</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ProjectGuid>3d262581-0f01-4317-9acc-3f104bb639cb</ProjectGuid>
<SelfContained>false</SelfContained>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions Documentation/Blazorise.Docs/Blazorise.Docs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
<ProjectReference Include="..\..\Source\Extensions\Blazorise.Splitter\Blazorise.Splitter.csproj" />
<ProjectReference Include="..\..\Source\Extensions\Blazorise.PdfViewer\Blazorise.PdfViewer.csproj" />
<PackageReference Include="MailKit" Version="4.8.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.*" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.*" />
<PackageReference Include="MimeKit" Version="4.8.0" />
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
</ItemGroup>

<!--Binary path for the code generator-->
<PropertyGroup>
<BinDocsCompiler>..\..\Documentation/Blazorise.Docs.Compiler/bin/Debug/net8.0/Blazorise.Docs.Compiler.dll</BinDocsCompiler>
<BinDocsCompiler>..\..\Documentation/Blazorise.Docs.Compiler/bin/Debug/net9.0/Blazorise.Docs.Compiler.dll</BinDocsCompiler>
</PropertyGroup>

<!--Project path for code generator-->
Expand Down Expand Up @@ -76,7 +76,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Markdig" Version="0.38.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.*" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.*" />
<PackageReference Include="SendGrid" Version="9.29.3" />
</ItemGroup>
<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions Documentation/Blazorise.Docs/Pages/Docs/TemplatesPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
<UnorderedListItem>
net8.0
</UnorderedListItem>
<UnorderedListItem>
net9.0
</UnorderedListItem>
</UnorderedList>
</Paragraph>
</DocsAttributesItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
</Paragraph>

<UnorderedList>
<UnorderedListItem>
<Paragraph>
<Strong>.NET 9</Strong>: Full support for .NET 9.
</Paragraph>
</UnorderedListItem>
<UnorderedListItem>
<Paragraph>
<Strong>Optimizations</Strong>: Optimized the internals of class providers.
Expand Down Expand Up @@ -125,6 +130,14 @@
New Features & Enhancements 🚀
</NewsPageSubtitle>

<Heading Size="HeadingSize.Is3">
.NET 9 Support
</Heading>

<Paragraph>
Blazorise now fully supports .NET 9. This update ensures compatibility with the latest .NET version, allowing you to leverage the newest features and enhancements in your Blazor applications. By upgrading to .NET 9, you can take advantage of improved performance, security, and productivity benefits, while maintaining seamless integration with Blazorise components and utilities.
</Paragraph>

<Heading Size="HeadingSize.Is3">
Autocomplete
</Heading>
Expand Down
6 changes: 3 additions & 3 deletions Shared/Blazorise.Shared/Blazorise.Shared.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,8 +18,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.*" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.*" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Source/Blazorise/Blazorise.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Blazorise.Licensing" Version="1.2.0" />
<PackageReference Include="Blazorise.Licensing" Version="1.3.0" />
</ItemGroup>

<PropertyGroup>
Expand Down
Loading
Loading