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

查看:34
本文介绍了添加对 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天全站免登陆