添加对netstandard 2.0的引用的问题 [英] Problems with adding reference to netstandard 2.0

查看:161
本文介绍了添加对netstandard 2.0的引用的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Asp.Net Core 1.1应用程序更改为Core 2.0

I changed my Asp.Net Core 1.1 application to Core 2.0

这很好,但是更新了nuget程序包后,到处都出现了这个错误

This went pretty well but after I updated my nuget packages and I get this error everywhere


类型 xxx在未引用的程序集中定义。您必须添加对程序集'netstandard,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = cc7b13ffcd2ddd51'的引用。

The type 'xxx' 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'.

当我按下按钮添加一个程序集,什么也没有发生。我尝试多次重建和还原我的软件包,但无法正常工作

When I press the button to add an assembly nothing happens. I tried rebuilding and restoring my packages multiple times but it won't work

推荐答案

我认为您在引用时遇到问题您的类库中的旧NETStandard版本。
只需确保已从解决方案中的所有csproj文件中删除了NETStandard参考。

I think you are having problem with the reference to the old NETStandard version in your class library. Just make sure you have removed NETStandard reference from all the csproj files in the solution.

这篇关于添加对netstandard 2.0的引用的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆