asp.net-mvc - asp-net core2新的web项目问题

标签 asp.net-mvc asp.net-core asp.net-core-2.0 .net-core-2.0

我正在尝试创建一个新的 ASP-Net core2 MVC 项目,但该项目创建时出现构建错误

Error   NU1202  Package System.Diagnostics.TraceSource 4.0.0 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0).

Error   NU1202  Package System.Runtime.Serialization.Formatters 4.3.0 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0)

有很多 NuGet 包兼容性问题,如屏幕截图所示 enter image description here

我安装了 dotnet core2,Visual Studio 版本 15.3.0 和 NuGet 4.1.0

我在这里错过了什么?

最佳答案

你有 NuGet 4.1.0 很奇怪,因为 VS 2017“15.3”应该随 NuGet 4.3.0 一起提供。 我尝试创建新项目并拥有与您相同的包,没有任何问题,但我安装了 Nuget 4.3.0。

尝试更新您的 Nuget 版本,因为目前只有 Nuget 4.3.0 完全支持 Standard 2.0/.NET Core 2.0。

关于asp.net-mvc - asp-net core2新的web项目问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45727637/

相关文章:

asp.net-core - “asp-src-include”不解析文件

.net - 完整.NET Framework上的ASP.NET Core 2.1

postgresql - 如何使用 PostgreSql 在代码优先方法中自动创建表

authentication - Asp.Net Core 2 中基于 token 的身份验证

c# - 使用 IoC 解析 Action Methods 中的模型对象

c# - ASP.NET MVC 中的 Toast 通知

c# - 使用 Azure Web 部署时保存到 Azure 根文件夹

c# - 从 ServiceCollection 获取 IConfiguration

asp.net-mvc - 在 Controller 中创建 jstree jquery_ajax

asp.net-mvc - Entity Framework 所需的外键 = db.SaveChanges 上的验证错误