AspNetCoreDashboard.Testing
1.0.0-beta-25
This is a prerelease version of AspNetCoreDashboard.Testing.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package AspNetCoreDashboard.Testing --version 1.0.0-beta-25
NuGet\Install-Package AspNetCoreDashboard.Testing -Version 1.0.0-beta-25
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AspNetCoreDashboard.Testing" Version="1.0.0-beta-25" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AspNetCoreDashboard.Testing" Version="1.0.0-beta-25" />
<PackageReference Include="AspNetCoreDashboard.Testing" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AspNetCoreDashboard.Testing --version 1.0.0-beta-25
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AspNetCoreDashboard.Testing, 1.0.0-beta-25"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AspNetCoreDashboard.Testing@1.0.0-beta-25
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AspNetCoreDashboard.Testing&version=1.0.0-beta-25&prerelease
#tool nuget:?package=AspNetCoreDashboard.Testing&version=1.0.0-beta-25&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AspNetCoreDashboard
面向 NuGet 类库作者的嵌入式 Web UI 宿主 SDK。可在 ASP.NET Core 8/9/10 或 OWIN(.NET Framework 4.8)应用中挂载自包含的 UI + API 模块。
.NET 支持策略
| 宿主 | TFM | 支持状态 |
|---|---|---|
| ASP.NET Core | net8.0、net9.0、net10.0 | 活跃维护 — 大版本发布时对齐当前 LTS / 当前版本 |
| OWIN / .NET Framework | net48 | 活跃维护 — 缺陷修复,与 Abstractions API 对齐 |
| UI 模块编写 | netstandard2.0 | 活跃维护 — 仅引用 Abstractions |
| System.Web | net48 | 活跃维护 — API 路由与流式静态资源;复杂场景优先 OWIN 或 ASP.NET Core |
新版 SDK 大版本与 ASP.NET Core LTS 发布节奏对齐;同一主版本内的补丁发布保持向后兼容。
包说明
| 包 | TFM | 适用场景 |
|---|---|---|
| AspNetCoreDashboard.Abstractions | netstandard2.0 | 编写 UI 模块 |
| AspNetCoreDashboard | net8.0;net9.0;net10.0 | ASP.NET Core 宿主 |
| AspNetCoreDashboard.Owin | net48 | OWIN / .NET Framework 宿主 |
| AspNetCoreDashboard.Generators | netstandard2.0 | 内容命名空间与路径前缀源生成器 |
| AspNetCoreDashboard.Testing | net8.0;net9.0;net10.0 | 集成测试辅助(可选) |
| AspNetCoreDashboard.Analyzers | netstandard2.0 | 编译期模块检查(可选) |
| AspNetCoreDashboard.Razor | net8.0;net9.0;net10.0 | Razor 预览路由(可选) |
| AspNetCoreDashboard.SystemWeb | net48 | System.Web HttpModule 适配器 |
快速开始(ASP.NET Core 8 / 9 / 10)
[UiModule("/MyModule")]
public sealed class MyUiModule : IUiModule
{
public string PathPrefix => "/MyModule";
public void Configure(IUiModuleRegistration builder)
{
builder.MapEmbeddedUi(typeof(MyUiModule).Assembly, "MyModule.Content")
.MapFallbackToIndex("MyModule.Content.index.html")
.MapGet("/api/items/{id}", ctx => ctx.WriteAsync(ctx.GetRouteValue("id")));
}
}
builder.Services.AddUiModuleHosting(o => o.ApplySecurityHeaders = true);
builder.Services.AddUiModules()
.AddModule<MyUiModule>(builder.Services)
.SetAuthorization("/MyModule", new LocalRequestsOnlyAuthorizationFilter());
app.UseUiModules();
使用 dotnet new install ./templates 安装模板后,执行 dotnet new acduimodule -n MyCompany.MyModule 可脚手架生成模块。
快速开始(OWIN / net48)
app.AddUiModules()
.AddModule<MyUiModule>()
.SetAuthorization("/MyModule", new LocalRequestsOnlyAuthorizationFilter());
app.UseUiModules();
示例项目
| 项目 | 说明 |
|---|---|
AspNetCoreDashboardLibrarySamples |
SampleUiModule + DiagnosticsUiModule(netstandard2.0) |
AspNetCoreDashboardWebSamples |
ASP.NET Core 最小宿主(net8/9/10) |
AspNetCoreDashboardOwinSamples |
OWIN 自宿主,端口 1101 |
运行 Web 示例:
dotnet run --project Samples/AspNetCoreDashboardWebSamples
# 打开 http://localhost:5000/Dashboard/
文档
许可证
MIT — 详见 LICENSE。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- AspNetCoreDashboard (>= 1.0.0-beta-25)
- AspNetCoreDashboard.Abstractions (>= 1.0.0-beta-25)
- Microsoft.AspNetCore.Mvc.Testing (>= 10.0.9)
-
net8.0
- AspNetCoreDashboard (>= 1.0.0-beta-25)
- AspNetCoreDashboard.Abstractions (>= 1.0.0-beta-25)
- Microsoft.AspNetCore.Mvc.Testing (>= 8.0.28)
-
net9.0
- AspNetCoreDashboard (>= 1.0.0-beta-25)
- AspNetCoreDashboard.Abstractions (>= 1.0.0-beta-25)
- Microsoft.AspNetCore.Mvc.Testing (>= 9.0.17)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-beta-29 | 0 | 7/14/2026 |
| 1.0.0-beta-27 | 0 | 7/14/2026 |
| 1.0.0-beta-25 | 0 | 7/14/2026 |
| 1.0.0-beta-21 | 0 | 7/14/2026 |
| 1.0.0-beta-20 | 44 | 7/9/2026 |