Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
539 views
in Technique[技术] by (71.8m points)

c# - ALINK : warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor

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.

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
question from:https://stackoverflow.com/questions/25365616/alink-warning-al1073-referenced-assembly-mscorlib-dll-targets-a-different-p

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

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]

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...