首页 > 解决方案 > 为什么会出现错误您必须添加对程序集“netstandard 使用 Visual Studio 2019 运行 Web 项目”的引用?

问题描述

我最近开始使用新的 VS 2019,但是在运行 ASP.NET MVC 项目时,我总是收到错误消息

The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

我不明白这个错误,因为我的应用程序是基于 .NET Framework 4.6.1 构建的,而且我不使用 lib netstandard,我碰巧知道它是用于 .NET Core 的。

如果我使用 VS 2017 运行它,我确实没有错误。我该如何解决这个问题?

标签: .netasp.net-mvcvisual-studio-2019

解决方案


推荐阅读