Asp.net core mvc 获取错误Microsoft.AspNetCore.MVC 1.1.0不支持framework.NETCoreApp,v1.1版
正在尝试使用MVC启动.Net核心项目。尝试使用最新版本的.Net CORE(v1.1),我无法获得MVC版本作为依赖项。下面是我的project.json文件Asp.net core mvc 获取错误Microsoft.AspNetCore.MVC 1.1.0不支持framework.NETCoreApp,v1.1版,asp.net-core-mvc,.net-core-1.1,Asp.net Core Mvc,.net Core 1.1,正在尝试使用MVC启动.Net核心项目。尝试使用最新版本的.Net CORE(v1.1),我无法获得MVC版本作为依赖项。下面是我的project.json文件 { "buildOptions": { "emitEntryPoint": true, "debugType": "portable", "preserveCompilationContext": true }, "dependencies": { "Microsoft.AspNetCor
{
"buildOptions": {
"emitEntryPoint": true,
"debugType": "portable",
"preserveCompilationContext": true
},
"dependencies": {
"Microsoft.AspNetCore.Diagnostics": "1.1.0",
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
"Microsoft.EntityFrameworkCore": "1.1.0",
"Microsoft.EntityFrameworkCore.Design": "1.1.0",
"Microsoft.EntityFrameworkCore.Relational": "1.1.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
"Microsoft.Extensions.Configuration.Json": "1.1.0"
},
"frameworks": {
"netcoreapp1.1": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.1.0"
}
},
"imports": [
"dnxcore50"
]
}
},
"publishOptions": {
"include": [
"wwwroot",
"web.config"
]
},
"runtimeOptions": {
"gcServer": true
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
给出此错误:
依赖项Microsoft.AspNetCore.Mvc 1.1.0不支持framework.NETCoreApp,版本=v1.1
只需从以下位置安装运行时(不仅仅是SDK):。
也许您需要执行“dotnetrestore”命令。
这对我有帮助