添加 Microsoft.Bcl.Async 后其他项目无法识别我的 dll
After adding Microsoft.Bcl.Async other projects don't recognize my dll
我正在使用 C# 和 .NET Framework 4.0 开发应用程序。
在一个项目中,我必须使用 async 关键字。为此,我添加了 Microsoft Async nuget 包。
添加后,另一个项目使用这个项目return这个消息:
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5):
warning MSB3268: the main reference
"D:\MyProject\bin\x86\Release\MyProject.dll" could not be resolved
because it has an indirect dependency of the .NET Framework Assembly
"System.Runtime, Version = 1. 5. 11. 0, Culture = neutral,
PublicKeyToken = b03f5f7f11d50a3a" that could not be resolved in the
version of .NET Framework of current destination. ". NETFramework,
Version = v4. 0 ". To resolve this problem, remove the reference
"D:\MyProject\bin\x86\Release\MyProject.dll" or set the fate of the
application to a .NET Framework version containing "System.Runtime,
Version = 1. 5. 11. 0, Culture = neutral, PublicKeyToken =
b03f5f7f11d50a3a".
还有另一个关于 "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
。
我尝试将 Microsoft.Bcl.Async
包添加到其他项目,但我遇到了同样的错误。
知道如何解决这个问题吗?
我已经按照所说的 here(问题 6)(并且还从 csproj 文件中删除了这两个 dll 的任何版本引用)但是我遇到了同样的错误。
解决方案是将 Microsoft BCL Build Components 添加到引用使用 Microsoft BCL Async 的项目的所有项目。
我正在使用 C# 和 .NET Framework 4.0 开发应用程序。
在一个项目中,我必须使用 async 关键字。为此,我添加了 Microsoft Async nuget 包。
添加后,另一个项目使用这个项目return这个消息:
C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3268: the main reference "D:\MyProject\bin\x86\Release\MyProject.dll" could not be resolved because it has an indirect dependency of the .NET Framework Assembly "System.Runtime, Version = 1. 5. 11. 0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" that could not be resolved in the version of .NET Framework of current destination. ". NETFramework, Version = v4. 0 ". To resolve this problem, remove the reference "D:\MyProject\bin\x86\Release\MyProject.dll" or set the fate of the application to a .NET Framework version containing "System.Runtime, Version = 1. 5. 11. 0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a".
还有另一个关于 "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
。
我尝试将 Microsoft.Bcl.Async
包添加到其他项目,但我遇到了同样的错误。
知道如何解决这个问题吗?
我已经按照所说的 here(问题 6)(并且还从 csproj 文件中删除了这两个 dll 的任何版本引用)但是我遇到了同样的错误。
解决方案是将 Microsoft BCL Build Components 添加到引用使用 Microsoft BCL Async 的项目的所有项目。