【发布时间】:2012-08-16 03:34:42
【问题描述】:
我们使用 dmake 构建机器,使用 VS2010 进行本地构建。一切正常,然后我安装了 VS2012 RC (ultimate)。
它在 Visual Studio 中构建正常,虽然我收到了一堆这样的警告:
There was a mismatch between the processor architecture of the project being built "MSIL"
and the processor architecture of the reference "MyAssembly, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86", "x86".
This mismatch may cause runtime failures.
Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references,
or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
但是,dmake 会抛出一堆错误信息,它们看起来都是这样的:
SomeFile.cs(172,16): error CS0433: The type 'System.Windows.Input.ICommand' exists in both
'c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.dll' and
'd:\SomeLocalDirectory\external\microsoft.net\framework\v4.0\PresentationCore.dll'
Windows\Microsoft.NET\Framework\v4.0.30319\System.dll: (Location of symbol related to previous error)
d:\SomeLocalDirectory\external\microsoft.net\framework\v4.0\PresentationCore.dll: (Location of symbol related to previous error)
从错误信息可以看出我们使用的是.NET的签入版本(这样我们就有了稳定的测试环境等),而且似乎是安装VS2012导致VS2010(或在至少 VS2010 附带的 CSC)来查找 WPF 程序集的其他副本。
还有其他人遇到这个吗?我知道有几种方法可以开始解决这个问题,但我希望有一种更直接的方法来解决这个问题。
【问题讨论】:
-
我知道微软声明 VS 2012 RC 可以与 VS 2010 SP1 一起安装,但我不相信它。在安装 VS 2012 RC 之前,您是否先卸载了 VS 2010?每次我安装 RC 时,它都会杀死我以前版本的 VS。
-
他们在哪里说的?我了解到 .NET 4 和 .NET 4.5 不能并存。
-
@JoeBehymer:您似乎误解了您的意思。您当然可以在同一台机器上安装“两者”。就您而言,为什么您在其他文件夹中有 PresentationCore.dll ?大多数人不这样做。
标签: wpf visual-studio-2010 visual-studio-2012 assembly-resolution csc