Skip to content

Commit

Permalink
feat(net9): support net9.0 framework (#4585)
Browse files Browse the repository at this point in the history
* chore: 更新框架到 net9.0

* doc: 格式化单元格

* chore: 更新打包脚本移除 BuildBundlerMinifierPlus 工具

* chore: 更新配置消除警告信息

* chore: 更新打包脚本移除 BuildBundlerMinifierPlus 工具

# Conflicts:
#	src/Bundle.props

* chore: 更新 scss 目录打包不输出

* chore: 更新开发模式脚本

* chore: 更新打包脚本

* refactor: 增加包私有化

* doc: 格式化单元格

* style: 更新 scroll 样式

* chore: 更新忽略配置

* chore: 更新工具链

* chore: 更改文件名

* chore: 移除代码拷贝脚本

* chore: 更新配置启用压缩

* chore: 开启 scss 脚本实时更新

* chore: 更新依赖包

* chore: 更新忽略文件

* chore: 更新拷贝任务名称

* chore: 增加警告忽略配置

* chore: 更新工具链配置

* refactor: 使用 Assets 特性

* refactor: 更新自动化 dotnet 版本

* chore: 更新框架

* refactor: 更新包消除警告信息

* chore: 更新依赖包

* chore: 更新依赖消除警告信息

* chore: 调整依赖

* refactor: 移除 Sass 打包工具

* refactor: 移动 sass 工具到 targets 配置文件中

* chore: 更新依赖包

* chore: 更新项目配置文件

* chore: 移除 version 相关配置

* refactor: 移除 Title 组件

* doc(ErrorLogger): 更新参数说明文档

* chore: bump version 9.0.0-rc03

* chore: 更新字典

* chore: 更新依赖

* doc: 更新命名空间

* refactor: 移除冗余样式

* refactor: 移除 ThemeLoader 组件

* refactor: 移除 ThemeLoader 组件
  • Loading branch information
ArgoZhang authored Nov 1, 2024
1 parent 79b0e24 commit 896a3ba
Show file tree
Hide file tree
Showing 22 changed files with 93 additions and 133 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-pull-request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Test
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Build
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Publish to Nuget
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Publish wasm
run: |
Expand Down
2 changes: 1 addition & 1 deletion Framework.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

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

</Project>
1 change: 1 addition & 0 deletions exclusion.dic
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,4 @@ Urls
Pharmacode
bluetooth
iframe
Sqlite
94 changes: 46 additions & 48 deletions src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,57 +18,55 @@
<EmbeddedResource Include="Locales\en-US.json" />
<EmbeddedResource Include="Locales\zh-CN.json" />
<EmbeddedResource Include="topology.json" />
<None Include="versionconfig.json" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BootstrapBlazor.AntDesignIcon" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.AzureOpenAI" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.AzureTranslator" Version="8.1.1" />
<PackageReference Include="BootstrapBlazor.BaiduSpeech" Version="8.1.1" />
<PackageReference Include="BootstrapBlazor.BaiduOcr" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.BarCode" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.BarcodeGenerator" Version="8.4.0" />
<PackageReference Include="BootstrapBlazor.BootstrapIcon" Version="8.0.3" />
<PackageReference Include="BootstrapBlazor.BootstrapIcon.Extensions" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.Chart" Version="8.4.0" />
<PackageReference Include="BootstrapBlazor.CherryMarkdown" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.CodeEditor" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.Dock" Version="8.3.0" />
<PackageReference Include="BootstrapBlazor.DockView" Version="8.4.0" />
<PackageReference Include="BootstrapBlazor.DriverJs" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.ElementIcon" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.FileViewer" Version="8.3.0" />
<PackageReference Include="BootstrapBlazor.FontAwesome" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.Gantt" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.Holiday" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.Html2Pdf" Version="8.3.0" />
<PackageReference Include="BootstrapBlazor.IconPark" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.ImageCropper" Version="8.3.0" />
<PackageReference Include="BootstrapBlazor.Live2DDisplay" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.Markdown" Version="8.2.1" />
<PackageReference Include="BootstrapBlazor.MaterialDesign" Version="8.1.0" />
<PackageReference Include="BootstrapBlazor.MaterialDesign.Extensions" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.MeiliSearch" Version="8.0.0" />
<PackageReference Include="BootstrapBlazor.Middleware" Version="8.0.0" />
<PackageReference Include="BootstrapBlazor.MindMap" Version="8.0.7" />
<PackageReference Include="BootstrapBlazor.MouseFollower" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.OnScreenKeyboard" Version="8.0.4" />
<PackageReference Include="BootstrapBlazor.PdfReader" Version="8.0.4" />
<PackageReference Include="BootstrapBlazor.Player" Version="8.3.0" />
<PackageReference Include="BootstrapBlazor.SignaturePad" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.Sortable" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.Splitting" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.SvgEditor" Version="8.1.0" />
<PackageReference Include="BootstrapBlazor.SummerNote" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.TableExport" Version="8.4.0" />
<PackageReference Include="BootstrapBlazor.TagHelper" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.Topology" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.VideoPlayer" Version="8.0.7" />
<PackageReference Include="BootstrapBlazor.WebAPI" Version="8.0.5" />
<PackageReference Include="BootstrapBlazor.WinBox" Version="8.2.0" />
<PackageReference Include="Longbow.Logging" Version="8.1.0" />
<PackageReference Include="Longbow.Tasks" Version="8.2.0" />
<PackageReference Include="BootstrapBlazor.AntDesignIcon" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.AzureOpenAI" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.AzureTranslator" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.BaiduSpeech" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.BaiduOcr" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.BarCode" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.BarcodeGenerator" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.BootstrapIcon" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.BootstrapIcon.Extensions" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Chart" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.CherryMarkdown" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.CodeEditor" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Dock" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.DockView" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.DriverJs" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.ElementIcon" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.FileViewer" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.FontAwesome" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Gantt" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Holiday" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Html2Pdf" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.IconPark" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.ImageCropper" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Live2DDisplay" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Markdown" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.MaterialDesign" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.MaterialDesign.Extensions" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.MeiliSearch" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Middleware" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.MindMap" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.MouseFollower" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.OnScreenKeyboard" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.PdfReader" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Player" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.SignaturePad" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Sortable" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Splitting" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.SvgEditor" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.SummerNote" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.TableExport" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.TagHelper" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.Topology" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.VideoPlayer" Version="9.0.0-beta01" />
<PackageReference Include="BootstrapBlazor.WinBox" Version="9.0.0-beta01" />
<PackageReference Include="Longbow.Logging" Version="9.0.0-beta01" />
<PackageReference Include="Longbow.Tasks" Version="9.0.0-beta01" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 8 additions & 7 deletions src/BootstrapBlazor.Server/Components/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
<link rel="icon" href="favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" href="favicon.png">
<Link Href="_content/BootstrapBlazor.FontAwesome/css/font-awesome.min.css" />
<Link Href="_content/BootstrapBlazor.MaterialDesign/css/md.min.css" />
<Link Href="_content/BootstrapBlazor.BootstrapIcon/css/bootstrap.min.css" />
<Link Href="_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css" />
<Link Href="_content/BootstrapBlazor/css/motronic.min.css" />
<Link Href="BootstrapBlazor.Server.styles.css" />
<Link Href="css/site.css" />
<link rel="stylesheet" href="@Assets["_content/BootstrapBlazor.FontAwesome/css/font-awesome.min.css"]" />
<link rel="stylesheet" href="@Assets["_content/BootstrapBlazor.MaterialDesign/css/md.min.css"]" />
<link rel="stylesheet" href="@Assets["_content/BootstrapBlazor.BootstrapIcon/css/bootstrap.min.css"]" />
<link rel="stylesheet" href="@Assets["_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css"]" />
<link rel="stylesheet" href="@Assets["_content/BootstrapBlazor/css/motronic.min.css"]" />
<link rel="stylesheet" href="@Assets["BootstrapBlazor.Server.styles.css"]" />
<link rel="stylesheet" href="@Assets["css/site.css"]" />
<ImportMap></ImportMap>
<HeadOutlet @rendermode="new InteractiveServerRenderMode(false)" />
</head>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@page "/mind-map"
@using BootstrapBlazor.Components.MindMaps
@inject IStringLocalizer<MindMaps> Localizer

<h3>@Localizer["MindMapTitle"]</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// See the LICENSE file in the project root for more information.
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone

using BootstrapBlazor.Components.MindMaps;

namespace BootstrapBlazor.Server.Components.Samples;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<Tips class="mt-3">
<p>@((MarkupString)Localizer["VideoPlayersTips"].Value)</p>
</Tips>

<DemoBlock Title="@Localizer["VideoPlayersNormalTitle"]"
Introduction="@Localizer["VideoPlayersNormalIntro"]"
Name="Normal">
Expand Down
6 changes: 3 additions & 3 deletions src/BootstrapBlazor.Server/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<Import Project="..\Directory.Build.props" />
<Import Project="..\..\Framework.props" />

<ItemGroup>
<SupportedPlatform Remove="browser" />
</ItemGroup>
<PropertyGroup>
<NoWarn>CS8002</NoWarn>
</PropertyGroup>

</Project>
9 changes: 0 additions & 9 deletions src/BootstrapBlazor.Server/Directory.Build.targets

This file was deleted.

17 changes: 1 addition & 16 deletions src/BootstrapBlazor.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using BootstrapBlazor.Server.Components;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.SignalR;
using Microsoft.AspNetCore.StaticFiles;
using Microsoft.Extensions.Options;
using System.Text;
using System.Text.Encodings.Web;
Expand Down Expand Up @@ -57,21 +56,8 @@
app.UseExceptionHandler("/Error");
app.UseResponseCompression();
}
app.UseStaticFiles(new StaticFileOptions { OnPrepareResponse = ctx => ctx.ProcessCache(app.Configuration) });

var provider = new FileExtensionContentTypeProvider
{
Mappings =
{
[".properties"] = "application/octet-stream",
[".moc"] = "application/x-msdownload",
[".moc3"] = "application/x-msdownload",
[".mtn"] = "application/x-msdownload"
}
};

app.UseStaticFiles(new StaticFileOptions { ContentTypeProvider = provider });
app.UseStaticFiles();
app.MapStaticAssets();

var cors = app.Configuration["AllowOrigins"]?.Split(',', StringSplitOptions.RemoveEmptyEntries);
if (cors?.Length > 0)
Expand All @@ -83,7 +69,6 @@
}

app.UseBootstrapBlazor();

app.UseAntiforgery();

app.MapDefaultControllerRoute();
Expand Down
11 changes: 0 additions & 11 deletions src/BootstrapBlazor.Server/versionconfig.json

This file was deleted.

4 changes: 1 addition & 3 deletions src/BootstrapBlazor/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>8.11.1-beta03</Version>
<Version>9.0.0-rc03</Version>
</PropertyGroup>

<ItemGroup>
Expand All @@ -11,13 +11,11 @@

<ItemGroup>
<Content Remove="sasscompiler.json" />
<Content Remove="versionconfig.json" />
<Content Remove="wwwroot\core\**\*.*" />
<Content Remove="wwwroot\lib\**\*.css" />
<Content Remove="wwwroot\scss\**\*.*" />
<Content Remove="wwwroot\src\**\*.*" />
<None Include="sasscompiler.json" />
<None Include="versionconfig.json" />
<None Include="wwwroot\core\**\*.*" />
<None Include="wwwroot\lib\**\*.css" />
<None Include="wwwroot\scss\**\*.*" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@
}
</ErrorLogger>
</CascadingValue>

11 changes: 6 additions & 5 deletions src/BootstrapBlazor/Components/ErrorLogger/ErrorLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ public class ErrorLogger : ComponentBase, IErrorLogger
private IStringLocalizer<ErrorLogger>? Localizer { get; set; }

/// <summary>
/// 获得/设置 是否开启全局异常捕获 默认 true
/// <inheritdoc/>
/// </summary>
[Parameter]
public bool EnableErrorLogger { get; set; } = true;

/// <summary>
/// 获得/设置 是否显示弹窗 默认 true 显示
/// <inheritdoc/>
/// </summary>
[Parameter]
public bool ShowToast { get; set; } = true;

/// <summary>
/// 获得/设置 Toast 弹窗标题
/// <inheritdoc/>
/// </summary>
[Parameter]
[NotNull]
public string? ToastTitle { get; set; }

/// <summary>
/// 获得/设置 自定义错误处理回调方法
/// <inheritdoc/>
/// </summary>
[Parameter]
public Func<ILogger, Exception, Task>? OnErrorHandleAsync { get; set; }
Expand All @@ -50,8 +50,9 @@ public class ErrorLogger : ComponentBase, IErrorLogger
public RenderFragment? ChildContent { get; set; }

/// <summary>
/// 获得/设置 异常显示模板
/// 获得/设置 异常显示模板 默认 null
/// </summary>
/// <remarks>用于自定义异常显示 UI</remarks>
[Parameter]
public RenderFragment<Exception>? ErrorContent { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions src/BootstrapBlazor/Components/ErrorLogger/IErrorLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface IErrorLogger
bool EnableErrorLogger { get; set; }

/// <summary>
/// 自定义 Error 处理方法
/// 获得/设置 自定义 Error 处理方法 默认 null
/// </summary>
/// <param name="ex"></param>
/// <returns></returns>
Expand All @@ -28,7 +28,7 @@ public interface IErrorLogger
bool ShowToast { get; }

/// <summary>
/// 获得 Error Toast 弹窗标题
/// 获得 Error Toast 弹窗标题 默认读取资源文件内容
/// </summary>
string? ToastTitle { get; }

Expand Down
Loading

0 comments on commit 896a3ba

Please sign in to comment.