简体   繁体   English

ASP.NET 4.6 WebForms 和 ASP.NET Core MVC 1.0(又名 MVC6)可以在同一个应用程序中运行吗?

[英]Can ASP.NET 4.6 WebForms and ASP.NET Core MVC 1.0 (aka MVC6) run in same application?

The information about ASP.NET Core MVC 1.0 (aka MVC 6) is a little light from Microsoft, so there's a few questions still unanswered. Microsoft 提供的有关 ASP.NET Core MVC 1.0(又名 MVC 6)的信息有点少,所以还有一些问题没有得到解答。 One question I have is in regards to backwards compatibility and upgradability.我的一个问题是关于向后兼容性和可升级性。 It's known that WebForms is not part of ASP.NET Core 1.0.众所周知,WebForms 不是 ASP.NET Core 1.0 的一部分。

What is unclear is whether ASP.NET Core MVC 1.0 (aka MVC 6) will run on both ASP.NET 4.x AND ASP.NET Core 1.0?尚不清楚的是 ASP.NET Core MVC 1.0(又名 MVC 6)是否会在 ASP.NET 4.x 和 ASP.NET Core 1.0 上运行? Or is ASP.NET Core MVC 1.0 only compatible with ASP.NET Core 1.0?还是 ASP.NET Core MVC 1.0 仅与 ASP.NET Core 1.0 兼容?

When attempting to upgrade the ASP.NET MVC nuget package from MVC 5 to MVC 6 (final RC1 at this time) the following error is given in Visual Studio:尝试将 ASP.NET MVC nuget 包从 MVC 5 升级到 MVC 6(此时为最终 RC1)时,Visual Studio 中出现以下错误:

Unable to find a version of 'Microsoft.AspNet.Razor' that is compatible with 'Microsoft.AspNet.Razor.Runtime 4.0.0-rc1-final constraint: Microsoft.AspNet.Razor (≥ 4.0.0-rc1-final)', 'Microsoft.AspNet.WebPages 3.2.3 constraint: Microsoft.AspNet.Razor (≥ 3.2.3 && < 3.3.0)'.无法找到与“Microsoft.AspNet.Razor.Runtime 4.0.0-rc1-final 约束:Microsoft.AspNet.Razor (≥ 4.0.0-rc1-final)”兼容的“Microsoft.AspNet.Razor”版本, 'Microsoft.AspNet.WebPages 3.2.3 约束:Microsoft.AspNet.Razor (≥ 3.2.3 && < 3.3.0)'。

It's unclear if this is a versioning issue with the RC, or if ASP.NET Core MVC (aka MVC 6) will not be supported on ASP.NET 4.6?目前尚不清楚这是否是 RC 的版本问题,或者 ASP.NET 4.6 是否不支持 ASP.NET Core MVC(又名 MVC 6)?

Basically, does/will ASP.NET Core MVC 1.0 (aka MVC 6) support running on ASP.NET 4.6?基本上,ASP.NET Core MVC 1.0(又名 MVC 6)是否支持在 ASP.NET 4.6 上运行?

No it won't.不,不会。

MVC 6/MVC Core 1.0 is aimed at, and only compatible with ASP.NET Core. MVC 6/MVC Core 1.0 是针对并且仅与 ASP.NET Core 兼容的。

You are going to have to do a manual upgrade / conversion of your application.您将不得不手动升级/转换您的应用程序。

you basically have three options, 1: convert everything in one shot.您基本上有三个选择,1:一次性转换所有内容。 2: convert as your go and have your site be actually two sites that work together until you finish the conversion 3: stick with what you have and do not upgrade. 2:随心所欲地转换,让您的站点实际上是两个可以协同工作的站点,直到您完成转换 3:坚持使用现有的,不要升级。

many reasons for choosing each option...选择每个选项的许多原因......

It wont support.它不会支持。 That is one of the reason they decided to make it core 1.0 instead of asp.net 5这就是他们决定将其作为核心 1.0 而不是 asp.net 5 的原因之一

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM