[英]<Assembly> uses Microsoft.Synchronization which has a higher version than referenced assembly
I am getting the following error building my C# project. 我在构建C#项目时遇到以下错误。
Assembly "name_of_assembly" uses 'Microsoft.Synchronization, Version=2.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' which has a higher version than referenced assembly 'Microsoft.Synchronization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
程序集“ name_of_assembly”使用“ Microsoft.Synchronization,版本= 2.1.0.0,文化=中性,PublicKeyToken = 89845dcd8080cc91”,其版本高于引用的程序集“ Microsoft.Synchronization,版本= 1.0.0.0,文化=中性,PublicKeyToken = 89845dcd8080cc91” '
I have made sure all my class libraries are targeting the same version of .NET framework which typically seems to be the problem. 我确保我所有的类库都针对相同版本的.NET Framework,这通常是问题所在。
I examined the installed programs and found I had version 1.0 and 2.1 of Microsoft Sync Framework installed. 我检查了已安装的程序,发现安装了Microsoft Sync Framework的1.0和2.1版本。 I uninstalled version 1 components.
我卸载了版本1组件。 That fixed the problem.
这解决了问题。
Now my code builds fine. 现在我的代码构建良好。
There are several components for each version in installed programs. 在已安装的程序中,每个版本都有多个组件。 I uninstalled two of v1.0 but still have its Runtime component but code already builds fine.
我卸载了两个v1.0,但仍具有其运行时组件,但是代码已经可以正常运行了。
If you only have v1 installed, uninstall it and install the correct version, version 2.1 is here . 如果仅安装了v1,请将其卸载并安装正确的版本, 此处为 2.1版。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.