依赖项microsoft.aspnetcore.mvc 1.0.0不支持框架.NETCoreApp,版本= v1.0

编程入门 行业动态 更新时间:2024-10-19 15:39:51
本文介绍了依赖项microsoft.aspnetcore.mvc 1.0.0不支持框架.NETCoreApp,版本= v1.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

鉴于刚刚到达RTM,尝试创建ASP.NET Core项目.我使用名为"ASP.NET Core Web应用程序(.NET Core)"的Visual Studio 2015 Update 3模板创建了一个新项目.然后,我转到Nuget软件包管理器,并将所有 package.json 软件包更新为1.0.0.Visual Studio无法还原该包,并出现此标题中的错误.

Trying to create an ASP.NET Core project given that it has just reached RTM. I created a new project using the Visual Studio 2015 Update 3 template called 'ASP.NET Core Web Application (.NET Core)'. I then went to the Nuget Package Manager and updated all the package.json packages to 1.0.0. Visual Studio fails to restore the package with the error in the title of this post.

这里是更新Nuget软件包后的 project.json :

Here is the project.json after updating Nuget Packages:

{ "dependencies": { "Microsoft.AspNetCore.Mvc": "1.0.0", "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0", "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0", "Microsoft.Extensions.Configuration.Json": "1.0.0", "Microsoft.Extensions.Logging": "1.0.0", "Microsoft.Extensions.Logging.Console": "1.0.0", "Microsoft.Extensions.Logging.Debug": "1.0.0", "Microsoft.NETCore.App": "1.0.0" }, "tools": { "Microsoft.AspNetCore.Server.IISIntegration.Tools": { "version": "1.0.0-preview-final", "imports": "portable-net45+win8+dnxcore50" } }, "frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "dnxcore50", "portable-net45+win8" ] } }, "buildOptions": { "emitEntryPoint": true, "preserveCompilationContext": true }, "runtimeOptions": { "gcServer": true }, "publishOptions": { "include": [ "wwwroot", "Views", "appsettings.json", "web.config" ] }, "scripts": { "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] } }

Nuget软件包管理器的输出:

The output from the Nuget Package Manager:

软件包Microsoft.AspNetCore.Mvc 1.0.0与不兼容netcoreapp1.0(.NETCoreApp,Version = v1.0).包裹Microsoft.AspNetCore.Mvc 1.0.0支持:-net451(.NETFramework,Version = v4.5.1)-netstandard1.6(.NETStandard,Version = v1.6)

Package Microsoft.AspNetCore.Mvc 1.0.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.AspNetCore.Mvc 1.0.0 supports: - net451 (.NETFramework,Version=v4.5.1) - netstandard1.6 (.NETStandard,Version=v1.6)

推荐答案

您是否记得要安装:用于Visual Studio的.NET Core工具?您可以获得此处.

Did you remember to install: .NET Core Tools for Visual Studio? You can get that here.

看看Scott Hanselman的博客.

Take a look at Scott Hanselman's Blog.

更多推荐

依赖项microsoft.aspnetcore.mvc 1.0.0不支持框架.NETCoreApp,版本= v1.0

本文发布于:2023-11-08 07:21:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1568713.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不支持   框架   版本   mvc   aspnetcore

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!