首页 新闻 会员 周边

You must add a reference to assembly 'netstandard'

0
悬赏园豆:20 [已解决问题] 解决于 2017-11-27 23:12

用VS2017 build一个既包含net471项目又包含netstandard2.0项目的.net core解决方案时总是出现下面的错误

The type 'ICollection<>' 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'
dudu的主页 dudu | 高人七级 | 园豆:30994
提问于:2017-11-27 22:29
< >
分享
最佳答案
0

在 github 上 You must add a reference to assembly netstandard errors 中找到了解决方法,在 .csproj 中手工添加如下的配置:

<Reference Include="netstandard" />
dudu | 高人七级 |园豆:30994 | 2017-11-27 22:46
其他回答(2)
0

vs2017 没有更新新.net standard ?

HarrisonWu | 园豆:229 (菜鸟二级) | 2019-03-13 09:50
0

思路有用,需要根据异常进行特定处理
我项目中正确的引用如下

    <Reference Include="netstandard">
      <Private>True</Private>
    </Reference>
repeatedly | 园豆:246 (菜鸟二级) | 2019-06-06 17:55
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册