刚刚更新到AspNetCore并且客户端的问题仍然引用ASPNET MVC包,例如:
"Microsoft.AspNet.Mvc": "1.0.0-*"
它们不再存在于我的包目录中,或者在项目json中有一个引用,并且已被新的命名空间替换,例如:
"Microsoft.AspNetCore.Mvc.Razor": "1.0.0-*"
我还删除并重新生成了锁定文件。在名称空间Micosoft.AspNet.Mvc和IUrlHelper等中不存在像Razor这样的错误。我也运行了新的dotnet命令而没有运气。
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true,
"define": [ "DEMO", "TESTING" ]
},
"dependencies": {
"Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*",
"Microsoft.AspNetCore.Server.WebListener": "0.1.0-*",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
"Microsoft.AspNetCore.Hosting": "1.0.0-*",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-*",
"Autofac": "4.0.0-*",
"Autofac.Extensions.DependencyInjection": "4.0.0-*",
"Newtonsoft.Json": "8.0.2",
"Microsoft.AspNetCore.Authentication.Facebook": "1.0.0-*",
"Microsoft.AspNetCore.Diagnostics.Elm": "0.1.0-rc2-16612",
"Microsoft.AspNetCore.Mvc.Core": "1.0.0-*",
"WindowsAzure.Storage": "6.2.2-preview",
"System.Linq.Parallel": "4.0.0",
"Microsoft.AspNetCore.Cors": "1.0.0-*",
"Microsoft.AspNetCore.Authentication": "1.0.0-*",
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-*",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-*",
"Microsoft.WindowsAzure.Caching": "2.7.0.0",
"Microsoft.AspNetCore.Mvc.DataAnnotations": "1.0.0-*",
"Google.Apis.Oauth2.v2": "1.10.0.1050",
"Google.Apis.Gmail.v1": "1.9.2.340",
"Google.Apis": "1.10.0",
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-*",
"Microsoft.AspNetCore.Mvc.ViewFeatures": "1.0.0-*",
"Microsoft.AspNetCore.Mvc.Abstractions": "1.0.0-*",
"Microsoft.AspNetCore.Mvc.Razor": "1.0.0-*",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0-rc2-*",
"Microsoft.NETCore.Platforms": "1.0.1-*",
"Microsoft.AspNetCore.Session": "1.0.0-rc2-*"
},
"commands": {
"web": "makeithappen"
},
"frameworks": {
"dnx451": {
"frameworkAssemblies": {
"System.Web": "4.0.0.0"
}
}
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components",
"dist",
".tmp"
],
"publishExclude": [
"**.user",
"**.vspscc",
"*.cmd"
],
"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
}
答案 0 :(得分:1)
控制器和视图组件发现被破坏。
"作为我们最近迁移的一部分,我们在Mvc"
中破坏了与DNX的兼容性