共享引用的mscorlib上出现警告MSB3258



因此,我目前正在处理一个.NET Framework项目,该项目引用了另一个与我合作的开发人员制作的DLL,我将其称为"random.DLL"。我的项目目标是.NET 3.5。我的项目中没有编译器错误,但当我试图在引用此DLL时进行构建时,我在构建过程中收到警告,称无法解决引用:

C:Program Files (x86)Microsoft Visual Studio2019CommunityMSBuildCurrentBinMicrosoft.Common.CurrentVersion.targets(2106,5): warning MSB3258: The primary reference "random.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.

当尝试引用该引用中的类时,此生成警告会导致我的生成失败。

然后,我压缩了我的项目,并将其发送给开发人员,开发人员能够在不更改项目的情况下自己构建它。我正试图弄清楚,只有我的机器上可能会有什么不同,从而导致这个问题。

将.net框架更改为4.0.0

最新更新