2

I have got a VS2010 solution which creates several assemblies for .NET 2.0.

This also includes satellite assemblies.

When I create everything with VS2010 it is fine. But I have a XP machine working as a build server using MSBuild. The satellite assemblies created from there are not recognized. Looking with ILDASM I see the VS2010 create metadata version 2 while MSBuild creates version 4. I guess that means VS2010 creates the correct .NET2 versions while MSBuild creates only the main assemblies for .NET2 but the satellite assemblies are .NET4.

I already know about this topic from here: What decides the target framework version of a satellite assembly?

But that does not work for me.

Any ideas how I can make the build server create .NET2 satellite assemblies? I might be able to enhance my script if I know how to call AL.exe properly.

Community
  • 1
  • 1
ZoolWay
  • 5,411
  • 6
  • 42
  • 76
  • 1
    Tried [this](http://stackoverflow.com/a/2419961/147211)? – KMoraz Apr 03 '13 at 22:42
  • Setting to tool version with the `/tv:2.0` switch does not help because then he uses the old C# compiler not the vs2010 c# 4.0 compiler. Setting the target framework does not help. As the output shows the call to `AL.exe` which generates the satellite assemblies is done the same way and ILDASM still shows .NET4-satellite-assemblies. – ZoolWay Apr 04 '13 at 08:40

1 Answers1

3

Okay, I hacked it out.

The build machine (WinXP) has a Windows SDK 7.1 with AL.exe 10.0.30.x. This is the one always creating .NET4-satellite assemblies.

My machine (Win7) with VS2010 has a Windows SDK 7.0a with AL.exe 9.0.30729.1. This is the one respecting the target framework.

I have (after backup) replace the AL.exe from the build machine with the one from mine. This works but I consider it a very dirty workaround.

If anyone knows a better way I would appreciate any help!

ZoolWay
  • 5,411
  • 6
  • 42
  • 76