我正在尝试在VS 2017上编译一个项目,但是我遇到了这个问题:
Original Answer(最初的回答):
warning MSB3258: The primary reference "someLib.dll" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.
之后,我遇到了与这个dll相关的错误(例如,类型或命名空间不在该命名空间中),但是当我双击错误时,它会消失,并且代码中的红色波浪线也会消失,暗示着这不是真正的问题。
我尝试过的所有方法都没有用:所有项目都在3.5上,我删除并重新添加了所有引用,在除了我的电脑之外的任何其他计算机上都没有出现这种情况。我还尝试从GAC中删除mscorlib(无论它有多愚蠢),但当然不让我这样做。
我看到了一些可能相关的东西: https://developercommunity.visualstudio.com/content/problem/230636/assemblydependency-now-misidentifying-indirect-dep.html 除了卸载并重新安装VS之外,我不知道该怎么办。 如果有人有任何想法,我很乐意尝试。
someLib.dll
引用了哪些库? - undefined