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

.NET 9 support #947

Merged
merged 3 commits into from
Nov 20, 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
4 changes: 2 additions & 2 deletions .github/workflows/static-web-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'

- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_GRAY_WAVE_0E4848710 }}
skip_deploy_on_missing_secrets: true
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/web-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up .NET 8.0.x
- name: Set up .NET 9.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'
include-prerelease: false

- name: Build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.4" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion BlazorBootstrap.Demo.Hosted/Client/wwwroot/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"github_issues": "//github.com/vikramlearning/blazorbootstrap/issues",
"github_discussions": "//github.com/vikramlearning/blazorbootstrap/discussions",
"stackoverflow": "//stackoverflow.com/questions/tagged/blazor-bootstrap"
}
},
"dotNetVersion": "9.0.0"
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions BlazorBootstrap.Demo.RCL/BlazorBootstrap.Demo.RCL.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand All @@ -11,8 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
</main>

<MainLayoutBaseFooter Version="@Version"
DotNetVersion="@DotNetVersion"
DocsUrl="@DocsUrl"
BlogUrl="@BlogUrl"
GithubUrl="@GithubUrl"
Expand Down
4 changes: 4 additions & 0 deletions BlazorBootstrap.Demo.RCL/Components/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
<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>
<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>
<li class="mb-2">Currently @Version.</li>
@if (!string.IsNullOrWhiteSpace(DotNetVersion))
{
<li class="mb-2">Powered by @DotNetVersion</li>
}
</ul>
</div>
<div class="col-6 col-lg-2 offset-lg-1 mb-3">
Expand Down
3 changes: 3 additions & 0 deletions BlazorBootstrap.Demo.RCL/Components/Layout/MainLayoutBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
public class MainLayoutBase : LayoutComponentBase
{
internal string version = default!;
internal string dotNetVersion = default!;
internal string docsUrl = default!;
internal string blogUrl = default!;
internal string githubUrl = default!;
Expand All @@ -23,6 +24,7 @@ public class MainLayoutBase : LayoutComponentBase
protected override void OnInitialized()
{
version = $"v{Configuration["version"]}"; // example: v0.6.1
dotNetVersion = $".NET {Configuration["dotNetVersion"]}"; // example: 9.0.0
docsUrl = $"{Configuration["urls:docs"]}";
blogUrl = $"{Configuration["urls:blog"]}";
githubUrl = $"{Configuration["urls:github"]}";
Expand All @@ -46,6 +48,7 @@ internal virtual async Task<Sidebar2DataProviderResult> Sidebar2DataProvider(Sid
internal virtual IEnumerable<NavItem> GetNavItems() => new List<NavItem>();

public string Version => version;
public string DotNetVersion => dotNetVersion;
public string DocsUrl => docsUrl;
public string BlogUrl => blogUrl;
public string GithubUrl => githubUrl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<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>
<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>
<li class="mb-2">Currently @Version.</li>
@if (!string.IsNullOrWhiteSpace(DotNetVersion))
{
<li class="mb-2">Powered by @DotNetVersion</li>
}
</ul>
</div>
<div class="col-6 col-lg-2 offset-lg-1 mb-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
public partial class MainLayoutBaseFooter : ComponentBase
{
[Parameter] public string? Version { get; set; }
[Parameter] public string? DotNetVersion { get; set; }
[Parameter] public string? DocsUrl { get; set; }
[Parameter] public string? BlogUrl { get; set; }
[Parameter] public string? GithubUrl { get; set; }
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>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>17d839f8-f71e-4856-829b-ccf23589bb77</UserSecretsId>
Expand Down
1 change: 1 addition & 0 deletions BlazorBootstrap.Demo.Server/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"github_discussions": "//github.com/vikramlearning/blazorbootstrap/discussions",
"stackoverflow": "//stackoverflow.com/questions/tagged/blazor-bootstrap"
},
"dotNetVersion": "9.0.0",
"GoogleMap": {
"ApiKey": "AIzaSyDc110Rvu20IMJhlZcWTOPoLbVQdnjLyXs"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.4" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.0" PrivateAssets="all" />
<PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions BlazorBootstrap.Demo.WebAssembly/wwwroot/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"github_discussions": "//github.com/vikramlearning/blazorbootstrap/discussions",
"stackoverflow": "//stackoverflow.com/questions/tagged/blazor-bootstrap"
},
"dotNetVersion": "9.0.0",
"GoogleMap": {
"ApiKey": "AIzaSyDc110Rvu20IMJhlZcWTOPoLbVQdnjLyXs"
}
Expand Down
11 changes: 8 additions & 3 deletions blazorbootstrap/BlazorBootstrap.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,18 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.29" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.36" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.11" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
</ItemGroup>

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

</Project>
Loading