Skip to content

Commit 15bee38

Browse files
authored
.NET 9 support (#947)
* .NET 9 support added.
1 parent 8ed7ada commit 15bee38

File tree

16 files changed

+44
-23
lines changed

16 files changed

+44
-23
lines changed

.github/workflows/static-web-app.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ jobs:
2929
- name: Setup .NET Core SDK
3030
uses: actions/setup-dotnet@v1
3131
with:
32-
dotnet-version: '8.0.x'
32+
dotnet-version: '9.0.x'
3333

3434
- name: Build And Deploy
3535
id: builddeploy
3636
uses: Azure/static-web-apps-deploy@v1
3737
with:
38-
dotnet-version: '8.0.x'
38+
dotnet-version: '9.0.x'
3939
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GRAY_WAVE_0E4848710 }}
4040
skip_deploy_on_missing_secrets: true
4141
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)

.github/workflows/web-app.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v2
2121

22-
- name: Set up .NET 8.0.x
22+
- name: Set up .NET 9.0.x
2323
uses: actions/setup-dotnet@v1
2424
with:
25-
dotnet-version: '8.0.x'
25+
dotnet-version: '9.0.x'
2626
include-prerelease: false
2727

2828
- name: Build

BlazorBootstrap.Demo.Hosted/Client/BlazorBootstrap.Demo.Hosted.Client.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.4" />
11-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.4" PrivateAssets="all" />
12-
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
12+
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

BlazorBootstrap.Demo.Hosted/Client/wwwroot/appsettings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
"github_issues": "//github.com/vikramlearning/blazorbootstrap/issues",
1414
"github_discussions": "//github.com/vikramlearning/blazorbootstrap/discussions",
1515
"stackoverflow": "//stackoverflow.com/questions/tagged/blazor-bootstrap"
16-
}
16+
},
17+
"dotNetVersion": "9.0.0"
1718
}

BlazorBootstrap.Demo.Hosted/Server/BlazorBootstrap.Demo.Hosted.Server.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Web">
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.4" />
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

BlazorBootstrap.Demo.RCL/BlazorBootstrap.Demo.RCL.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>
@@ -11,8 +11,8 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.4" />
15-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
14+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.0" />
15+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

BlazorBootstrap.Demo.RCL/Components/Layout/EmptyLayout.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
</main>
8282

8383
<MainLayoutBaseFooter Version="@Version"
84+
DotNetVersion="@DotNetVersion"
8485
DocsUrl="@DocsUrl"
8586
BlogUrl="@BlogUrl"
8687
GithubUrl="@GithubUrl"

BlazorBootstrap.Demo.RCL/Components/Layout/MainLayout.razor

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
<li class="mb-2">Designed and built with all the love in the world by the <strong><a href="https://www.nuget.org/packages/Blazor.Bootstrap">Blazor Bootstrap</a></strong> team with the help of our contributors.</li>
6161
<li class="mb-2">Code licensed <a href="https://github.com/vikramlearning/blazorbootstrap/blob/main/LICENSE.txt" target="_blank" rel="license noopener">Apache License 2.0</a>.</li>
6262
<li class="mb-2">Currently @Version.</li>
63+
@if (!string.IsNullOrWhiteSpace(DotNetVersion))
64+
{
65+
<li class="mb-2">Powered by @DotNetVersion</li>
66+
}
6367
</ul>
6468
</div>
6569
<div class="col-6 col-lg-2 offset-lg-1 mb-3">

BlazorBootstrap.Demo.RCL/Components/Layout/MainLayoutBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
public class MainLayoutBase : LayoutComponentBase
44
{
55
internal string version = default!;
6+
internal string dotNetVersion = default!;
67
internal string docsUrl = default!;
78
internal string blogUrl = default!;
89
internal string githubUrl = default!;
@@ -23,6 +24,7 @@ public class MainLayoutBase : LayoutComponentBase
2324
protected override void OnInitialized()
2425
{
2526
version = $"v{Configuration["version"]}"; // example: v0.6.1
27+
dotNetVersion = $".NET {Configuration["dotNetVersion"]}"; // example: 9.0.0
2628
docsUrl = $"{Configuration["urls:docs"]}";
2729
blogUrl = $"{Configuration["urls:blog"]}";
2830
githubUrl = $"{Configuration["urls:github"]}";
@@ -46,6 +48,7 @@ internal virtual async Task<Sidebar2DataProviderResult> Sidebar2DataProvider(Sid
4648
internal virtual IEnumerable<NavItem> GetNavItems() => new List<NavItem>();
4749

4850
public string Version => version;
51+
public string DotNetVersion => dotNetVersion;
4952
public string DocsUrl => docsUrl;
5053
public string BlogUrl => blogUrl;
5154
public string GithubUrl => githubUrl;

BlazorBootstrap.Demo.RCL/Components/Layout/MainLayoutBaseFooter.razor

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
<li class="mb-2">Designed and built with all the love in the world by the <strong><a href="https://www.nuget.org/packages/Blazor.Bootstrap">Blazor Bootstrap</a></strong> team with the help of our contributors.</li>
1414
<li class="mb-2">Code licensed <a href="https://github.com/vikramlearning/blazorbootstrap/blob/main/LICENSE.txt" target="_blank" rel="license noopener">Apache License 2.0</a>.</li>
1515
<li class="mb-2">Currently @Version.</li>
16+
@if (!string.IsNullOrWhiteSpace(DotNetVersion))
17+
{
18+
<li class="mb-2">Powered by @DotNetVersion</li>
19+
}
1620
</ul>
1721
</div>
1822
<div class="col-6 col-lg-2 offset-lg-1 mb-3">

0 commit comments

Comments
 (0)