您好,我在安装了 vs 2012 的 Server 2008 r2 x64 上构建 x86 解决方案时遇到问题。它总是出现以下错误:
[msbuild] "C:\fake.sln" (Build target) (1) ->
[msbuild] "C:\fake.csproj.metaproj" (default target) (2) ->
[msbuild] "C:\fake.csproj" (default target) (8) ->
[msbuild] "C:\xeqodvbc.tmp_proj" (_CompileTemporaryAssembly target) (11) ->
[msbuild] (CoreCompile target) ->
[msbuild] error CS1607 : Warning as error : Assembly generation -- Referenced assembly 'PresentationCore.dll' targets a different processor [C:\xeqodvbc.tmp_proj]
[msbuild] error CS1607 : Warning as error : Assembly generation -- Referenced assembly 'System.Data.dll' targets a different processor [C:\xeqodvbc.tmp_proj]
下面是失败的 nant 任务。(我已经更改了项目名称) Set3.5 目标所做的只是将 msbuild.targetframework 属性设置为 v3.5。
<target name="faketarget" depends="makeTempDir" description="builds">
<call target="set3.5" />
<msbuild project="our32bit.sln" target="Build" verbosity="${msbuild.verbosity}">
<property name="Configuration" value="${build.configuration}" />
<property name="Platform" value="x86" />
<property name="PlatformTarget" value="x86" />
<!--<property name="Platform" value="${build.platform}" />-->
<property name="RunCodeAnalysis" value="${code.analysis}" />
<property name="CodeAnalysisRules" value="${code.analysis.rules}" />
<property name="TargetFrameworkVersion" value="${msbuild.targetframework}" />
</msbuild>
现在,如果我进入解决方案的文件夹并调用 msbuild /p:TargetFrameworkVersion=v3.5 它构建没有问题,如果我在 VS 2012 中打开它,我也可以从那里构建它。有什么建议么?