Skip to content

Commit d97754f

Browse files
Migrating to .NET 8 (#4998)
* Upgrade net8 packages * Fix warning in launchSettings * Use App.razor for base component * Rename Seo class to SeoGenerator * Configure Program and Startup for net8 * Add StreamRendering to pricing page * Add more net8 packages * Add counter page to test interactivity * Make the router take in rendermode Server * Separate Routes.razor * Use Routes.razor * Use net8.0 for Blazorise.Docs.Compiler * ThemeProvider in Routes * Add missing rewardful JS scripts * Formating * Remove render mode from home and pricing pages * Update NuGet packages * Update server rendering mode APIs * Fix static files query version * Skip TableOfContents if there is no TOC container * Update demos and docs to net8.0 * Update playwright path * Update playwright to latest * Delete NuGet.config * Remove AllowSynchronousIO * Interactive HeadOutlet * Delete counter page * Fix blog seo --------- Co-authored-by: David Moreira <[email protected]>
1 parent ece5c9f commit d97754f

File tree

41 files changed

+241
-298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+241
-298
lines changed

.github/workflows/blazorise-ci-basic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: dotnet test ./Tests/Blazorise.Tests/Blazorise.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal
3939

4040
- name: Prepare E2E Tests Dependencies
41-
run: pwsh ./Tests/Blazorise.E2E.Tests/bin/Release/net7.0/playwright.ps1 install --with-deps
41+
run: pwsh ./Tests/Blazorise.E2E.Tests/bin/Release/net8.0/playwright.ps1 install --with-deps
4242

4343
- name: Run E2E Tests - Release
4444
run: dotnet test ./Tests/Blazorise.E2E.Tests/Blazorise.E2E.Tests.csproj --configuration Release --no-restore --no-build --verbosity normal

.runsettings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<EnvironmentVariables>
1010
<!-- For debugging selectors, it's recommend to set the following environment variable -->
1111
<!--<DEBUG>pw:api</DEBUG>-->
12+
<!--<DEBUG>pw:channel:response,pw:channel:event</DEBUG>-->
1213
</EnvironmentVariables>
1314
</RunConfiguration>
1415

Build/Blazorise.Client.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<OutputType>Exe</OutputType>
66
<LangVersion>10.0</LangVersion>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.*" />
11-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.*" PrivateAssets="all" />
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.*" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.*" PrivateAssets="all" />
1212
</ItemGroup>
1313

1414
</Project>

Build/Blazorise.Demo.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<OutputType>Library</OutputType>
66
<IsPackable>true</IsPackable>
77
<LangVersion>10.0</LangVersion>
88
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.AspNetCore.Components" Version="7.0.*" />
13-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.*" />
12+
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.*" />
13+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.*" />
1414
</ItemGroup>
1515

1616
<ItemGroup>
1717
<PackageReference Include="Markdig" Version="0.30.4" />
18-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.*" />
19-
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.*" />
18+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.*" />
19+
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.*" />
2020
<PackageReference Include="FluentValidation" Version="11.2.0" />
2121
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.2.0" />
2222
<PackageReference Include="Flurl.Http" Version="4.0.0-pre2" />

Build/Blazorise.Docs.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<OutputType>Library</OutputType>
66
<IsPackable>true</IsPackable>
77
<LangVersion>10.0</LangVersion>
88
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.AspNetCore.Components" Version="7.0.*" />
13-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.*" />
12+
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.*" />
13+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.*" />
1414
<PackageReference Include="FluentValidation" Version="11.2.0" />
1515
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.2.0" />
1616
</ItemGroup>

Build/Blazorise.Server.RC.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>10.0</LangVersion>
66
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.*" />
10+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.*" />
1111
</ItemGroup>
1212

1313
</Project>

Build/Blazorise.Server.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>10.0</LangVersion>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.*" />
10-
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.*" />
9+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.*" />
10+
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.*" />
1111
</ItemGroup>
1212

1313
</Project>

Build/Blazorise.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
</ItemGroup>
5858

5959
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
60-
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.0-rc.2.*" />
61-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0-rc.2.*" />
62-
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0-rc.2.*" />
60+
<PackageReference Include="Microsoft.AspNetCore.Components" Version="8.0.*" />
61+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.*" />
62+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.*" />
6363
</ItemGroup>
6464
</Project>

Demos/Blazorise.Demo.AntDesign/Properties/PublishProfiles/FolderProfile.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1313
<PublishUrl>D:\Projects\_releases\Blazorise\antdesign</PublishUrl>
1414
<WebPublishMethod>FileSystem</WebPublishMethod>
1515
<SiteUrlToLaunchAfterPublish />
16-
<TargetFramework>net7.0</TargetFramework>
16+
<TargetFramework>net8.0</TargetFramework>
1717
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
1818
<ProjectGuid>39cce894-2049-493f-9b49-2d8b94e4a1b6</ProjectGuid>
1919
<SelfContained>true</SelfContained>

Demos/Blazorise.Demo.Bootstrap.Server/Properties/PublishProfiles/FolderProfile.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1313
<PublishUrl>D:\Projects\_releases\Blazorise\rcbootstrap</PublishUrl>
1414
<WebPublishMethod>FileSystem</WebPublishMethod>
1515
<SiteUrlToLaunchAfterPublish />
16-
<TargetFramework>net7.0</TargetFramework>
16+
<TargetFramework>net8.0</TargetFramework>
1717
<ProjectGuid>2b39f3d9-4721-4ea7-9272-708238d1208f</ProjectGuid>
1818
<SelfContained>false</SelfContained>
1919
</PropertyGroup>

Demos/Blazorise.Demo.Bootstrap/Properties/PublishProfiles/FolderProfile.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1313
<PublishUrl>D:\Projects\_releases\Blazorise\bootstrap</PublishUrl>
1414
<WebPublishMethod>FileSystem</WebPublishMethod>
1515
<SiteUrlToLaunchAfterPublish />
16-
<TargetFramework>net7.0</TargetFramework>
16+
<TargetFramework>net8.0</TargetFramework>
1717
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
1818
<ProjectGuid>36be2535-4cab-4d2d-8ec8-a5396214ea91</ProjectGuid>
1919
<SelfContained>true</SelfContained>

Demos/Blazorise.Demo.Bootstrap5/Properties/PublishProfiles/FolderProfile.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1313
<PublishUrl>D:\Projects\_releases\Blazorise\bootstrap5</PublishUrl>
1414
<WebPublishMethod>FileSystem</WebPublishMethod>
1515
<SiteUrlToLaunchAfterPublish />
16-
<TargetFramework>net7.0</TargetFramework>
16+
<TargetFramework>net8.0</TargetFramework>
1717
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
1818
<ProjectGuid>cca627e3-633e-4f00-854c-f028ab298cf5</ProjectGuid>
1919
<SelfContained>true</SelfContained>

Demos/Blazorise.Demo.Bulma/Properties/PublishProfiles/FolderProfile.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1313
<PublishUrl>D:\Projects\_releases\Blazorise\bulma</PublishUrl>
1414
<WebPublishMethod>FileSystem</WebPublishMethod>
1515
<SiteUrlToLaunchAfterPublish />
16-
<TargetFramework>net7.0</TargetFramework>
16+
<TargetFramework>net8.0</TargetFramework>
1717
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
1818
<ProjectGuid>71232d47-6012-4fec-a52a-86301faa0ae8</ProjectGuid>
1919
<SelfContained>true</SelfContained>

Demos/Blazorise.Demo.Material/Properties/PublishProfiles/FolderProfile.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1414
<WebPublishMethod>FileSystem</WebPublishMethod>
1515
<_TargetId>Folder</_TargetId>
1616
<SiteUrlToLaunchAfterPublish />
17-
<TargetFramework>net7.0</TargetFramework>
17+
<TargetFramework>net8.0</TargetFramework>
1818
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
1919
<ProjectGuid>4deb65e7-40ba-409e-9c26-6ef75adf2601</ProjectGuid>
2020
<SelfContained>true</SelfContained>

Demos/Blazorise.Demo.Tailwind/Properties/PublishProfiles/FolderProfile.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1414
<WebPublishMethod>FileSystem</WebPublishMethod>
1515
<_TargetId>Folder</_TargetId>
1616
<SiteUrlToLaunchAfterPublish />
17-
<TargetFramework>net7.0</TargetFramework>
17+
<TargetFramework>net8.0</TargetFramework>
1818
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
1919
<ProjectGuid>47eeb5b2-3ca1-436c-8317-e69f611fa1e3</ProjectGuid>
2020
<SelfContained>true</SelfContained>

Documentation/Blazorise.Docs.Compiler/Blazorise.Docs.Compiler.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net7.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>

Documentation/Blazorise.Docs.Generator/Blazorise.Docs.Generator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net7.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

Documentation/Blazorise.Docs.Generator/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
// </summary>
2222
//</member>
2323
var blzSrcPath = @"..\..\..\..\..\Source\Blazorise";
24-
var file = @$"{blzSrcPath}\obj\Debug\net7.0\Blazorise.xml";
24+
var file = @$"{blzSrcPath}\obj\Debug\net8.0\Blazorise.xml";
2525
var enumsFolder = @$"{blzSrcPath}\Enums";
26-
string outputPath = @$"{blzSrcPath}\obj\Debug\net7.0\EnumsOutput.txt";
26+
string outputPath = @$"{blzSrcPath}\obj\Debug\net8.0\EnumsOutput.txt";
2727

2828
var enumsFolderDirectory = new DirectoryInfo( enumsFolder );
2929
var enumFileNames = enumsFolderDirectory.GetFiles().Select( x => x.Name.Split( ".cs" )[0] );

Documentation/Blazorise.Docs.Server/Blazorise.Docs.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<UserSecretsId>$(MSBuildProjectName)</UserSecretsId>
66
</PropertyGroup>
77

Documentation/Blazorise.Docs.Server/Infrastructure/Seo.cs renamed to Documentation/Blazorise.Docs.Server/Infrastructure/SeoGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Blazorise.Docs.Server.Infrastructure;
1010

11-
public class Seo
11+
public class SeoGenerator
1212
{
1313
public static async Task GenerateRobots( HttpContext context )
1414
{

Documentation/Blazorise.Docs.Server/Pages/_Host.cshtml

Lines changed: 0 additions & 9 deletions
This file was deleted.

Documentation/Blazorise.Docs.Server/Pages/_Layout.cshtml

Lines changed: 0 additions & 90 deletions
This file was deleted.
Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1-
using Microsoft.AspNetCore.Hosting;
2-
using Microsoft.Extensions.Configuration;
3-
using Microsoft.Extensions.Hosting;
4-
using Microsoft.Extensions.Logging;
5-
using System;
6-
using System.Collections.Generic;
7-
using System.Linq;
8-
using System.Threading.Tasks;
1+
using Blazorise.Docs.Server;
2+
using Microsoft.AspNetCore.Builder;
93

10-
namespace Blazorise.Docs.Server;
4+
namespace Blazorise.Docs;
115

126
public class Program
137
{
148
public static void Main( string[] args )
159
{
16-
CreateHostBuilder( args ).Build().Run();
17-
}
10+
var builder = WebApplication.CreateBuilder( args );
11+
12+
var startup = new Startup( builder.Configuration );
13+
14+
startup.ConfigureServices( builder.Services );
1815

19-
public static IHostBuilder CreateHostBuilder( string[] args ) =>
20-
Host.CreateDefaultBuilder( args )
21-
.ConfigureWebHostDefaults( webBuilder =>
22-
{
23-
webBuilder.UseStartup<Startup>();
24-
} );
16+
var app = builder.Build();
17+
18+
startup.Configure( app );
19+
20+
app.Run();
21+
}
2522
}

Documentation/Blazorise.Docs.Server/Properties/PublishProfiles/FolderProfile.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
1313
<PublishUrl>D:\Projects\_releases\Blazorise\docs-v2</PublishUrl>
1414
<WebPublishMethod>FileSystem</WebPublishMethod>
1515
<SiteUrlToLaunchAfterPublish />
16-
<TargetFramework>net7.0</TargetFramework>
16+
<TargetFramework>net8.0</TargetFramework>
1717
<ProjectGuid>3d262581-0f01-4317-9acc-3f104bb639cb</ProjectGuid>
1818
<SelfContained>false</SelfContained>
1919
</PropertyGroup>

0 commit comments

Comments
 (0)