5

Under Visual Studio 2010, I am getting a compiler warning when generating a localized satellite assembly for a project. I am running Windows 7 64-bit.

The project is being built in x86 (it has to be as it indirectly references an unmanaged DLL - via Oracle ODP.NET).

The MSBuild log generates the following warning:

(GenerateSatelliteAssemblies target) ->

ALINK : warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor [xxx.csproj]

Is there any way to force this to use the same version of the framework as the assembly it is being generated from?

It is very frustrating as I like to have zero warnings in our build, and this is always there.

Community
  • 1
  • 1
Stephen Drew
  • 1,415
  • 19
  • 31
  • Did you try using the x86 version of MSBuild, that is the one located in C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319 and not in C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319? – Igor Korkhov Jun 07 '11 at 09:34
  • No I didn't. I will try forcing TFS to use the x86 platform. But how can I resolve this using my Visual Studio, as I also get this error there.... – Stephen Drew Jun 07 '11 at 09:43
  • You can check the References node in your solution, check the properties of, say, System.dll, the path should be C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\... for x86 and C:\Program Files\Reference Assemblies\Microsoft\Framework\... for x64. Hope this will give you a clue. – Igor Korkhov Jun 07 '11 at 10:00
  • 1
    Yeah this seems to have solved the problem in TFS...but not in VS2010. – Stephen Drew Jun 07 '11 at 11:06
  • 1
    But I shouldn't have to add different assembly references for the core libraries in different configurations should I? – Stephen Drew Jun 08 '11 at 08:45
  • Maybe you shouldn't, but I just don't know how to tell VS to reference appropriate vesrions of core libraries depending on the active platform when it generates satellite assemblies. – Igor Korkhov Jun 08 '11 at 15:25

1 Answers1

1

I reproduced this error (by mistake). My projects target x86 (because of 3rd party DLLs), but I ran MSBuild in VSx64 2010 command window. That sets Platform=X64 among other things. When I ran it under VS 2010 command window (for x86), I didn't get this warning.