本文介绍了ALINK:警告 AL1073:引用的程序集“mscorlib.dll"针对不同的处理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用 VS2013 和 .Net 4.5.1(最近迁移,但此错误来自 .Net 4.0).只有在平台目标 x64 中编译项目时才会出现此错误.这真的是一个会在运行时中断的错误吗?为什么 MSBUILD 不能正确解析此 mrcorlib.dll?这仅发生在 VS2010 中创建的项目中,不会发生在新创建的项目中.我在这里错过了什么.我所有的第三方程序集都是 x64 位的.

We are using VS2013 and .Net 4.5.1(recently migrated, but this error is there from .Net 4.0) . This error occurs only when compiling the project in platform target x64. Is this really a error which will break in runtime? Why MSBUILD does not resolve this mrcorlib.dll properly ? This happens only in projects which were created in VS2010 and does not occur in newly created projects. What am I missing here. All my third party assemblies are in x64bit.

在 TeamCity 构建服务器中,出现以下错误:

In TeamCity build server, I get following error:

GenerateSatelliteAssemblies
[17:01:18]AL
[17:01:18]C:Program Files (x86)Microsoft SDKsWindowsv8.1AinNETFX 4.5.1 ToolsAL.exe /culture:de /keyfile:....MyApp.snk /out:objx64ReleasedeMyApp.Hardware.Softing.resources.dll /platform:x64 /template:objx64ReleaseMyApp.Hardware.Softing.dll /embed:objx64ReleaseMyApp.Hardware.Softing.Properties.Resources.de.resources
[17:01:18]ALINK warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor

推荐答案

虽然 @jero2rome 引用的错误已关闭为 Won't Fix,VS2015 RC w/.NET 4.6 不再发出此警告:

While the bug referenced by @jero2rome is closed as Won't Fix, VS2015 RC w/ .NET 4.6 no longer emits this warning:

从 VS2013/.NET 4.5.1 开始,我会看到同样的问题:

From VS2013/.NET 4.5.1, I would see the same issue:

GenerateSatelliteAssemblies:
C:Program Files (x86)Microsoft SDKsWindowsv8.1AinNETFX 4.5.1 ToolsAL.exe /culture:zh-CHT /out:objx64Debugzh-CHTMyComponent.resources.dll /platform:x64 /template:objx64DebugMyComponent.dll /embed:objx64DebugMyComponent.Resources.string.zh-CHT.resources
ALINK : warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor [c:svnprojectMyComponent.csproj]

使用 VS2015 RC/.NET 4.6,不会发出警告:

With VS2015 RC/.NET 4.6, no warning is emitted:

GenerateSatelliteAssemblies:
C:Program Files (x86)Microsoft SDKsWindowsv10.0AinNETFX 4.6 Toolsx64AL.exe /culture:zh-CHT /out:objx64Debugzh-CHTMyComponent.resources.dll /platform:x64 /template:objx64DebugMyComponent.dll /embed:objx64DebugMyComponent.Resources.string.zh-CHT.resources

这篇关于ALINK:警告 AL1073:引用的程序集“mscorlib.dll"针对不同的处理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 00:22