我已经设置好了我的 .build。
<csc platform='x86' target='winexe' output='${validate.file}' debug='${debug}' warnaserror='true'>
但我收到
[csc] error CS1607: Warning as Error: Assembly generation -- Referenced assembly 'System.Data.dll' targets a different processor
[csc] error CS1607: Warning as Error: Assembly generation -- Referenced assembly 'System.Data.OracleClient.dll' targets a different processor
[csc] error CS1607: Warning as Error: Assembly generation -- Referenced assembly 'System.EnterpriseServices.dll' targets a different processor
[csc] error CS1607: Warning as Error: Assembly generation -- Referenced assembly 'System.Transactions.dll' targets a different processor
[csc] error CS1607: Warning as Error: Assembly generation -- Referenced assembly 'System.Web.dll' targets a different processor
[csc] error CS1607: Warning as Error: Assembly generation -- Referenced assembly 'mscorlib.dll' targets a different processor
External Program Failed: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe (return code was 1)
当我使用NAnt .92时出现问题。如果我使用NAnt .91则一切正常。如何更新我的.build文件以使其与.92版本兼容呢?我在Win7 64位上构建。
在NAnt .91中,使用完全相同的.build文件时,所使用的外部程序是 C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe
。注意Framework,而不是Framework64。看起来当选择platform='x86'
时,NAnt .92使用了错误的框架。