在 class 库中使用 asp.net 核心 mvc 的预览版
Using the preview versions of asp.net core mvc in a class libary
我正在制作一个 ASP.Net 核心 MVC 应用程序来处理多个子域。因此,我想在不同的项目中按子域拆分所有 Views/Controllers。我目前正在努力的是在 .Net Core 3 Class 库中引用 ASP.Net 核心框架的最新预发布版。
现在我不知道我需要引用哪个 nuget 包,以便能够拥有控制器和视图所需的所有库。
我怀疑 Microsoft.AspNetCore.Mvc
nuget 包就是我所需要的,但它是版本 v2.2.0
而不是预发布版本,例如3.0.0-preview9.19423.6
.
在 ASP.NET Core 3.0 中,MVC 是 Shared Framework. The Microsoft.AspNetCore.Mvc
package is one of many that will no longer be published separately 的一部分。
To simplify the way in which consumers target and use the ASP.NET Core shared framework, we will stop producing many of the NuGet packages that we have been shipping since ASP.NET Core 1.0. The API those packages provide are still available to apps by using a <FrameworkReference>
to Microsoft.AspNetCore.App. This includes commonly referenced API, such as Kestrel, Mvc, Razor, and others.
我正在制作一个 ASP.Net 核心 MVC 应用程序来处理多个子域。因此,我想在不同的项目中按子域拆分所有 Views/Controllers。我目前正在努力的是在 .Net Core 3 Class 库中引用 ASP.Net 核心框架的最新预发布版。
现在我不知道我需要引用哪个 nuget 包,以便能够拥有控制器和视图所需的所有库。
我怀疑 Microsoft.AspNetCore.Mvc
nuget 包就是我所需要的,但它是版本 v2.2.0
而不是预发布版本,例如3.0.0-preview9.19423.6
.
在 ASP.NET Core 3.0 中,MVC 是 Shared Framework. The Microsoft.AspNetCore.Mvc
package is one of many that will no longer be published separately 的一部分。
To simplify the way in which consumers target and use the ASP.NET Core shared framework, we will stop producing many of the NuGet packages that we have been shipping since ASP.NET Core 1.0. The API those packages provide are still available to apps by using a
<FrameworkReference>
to Microsoft.AspNetCore.App. This includes commonly referenced API, such as Kestrel, Mvc, Razor, and others.