0

Is it possible to build the same C# solution against two different target framework versions in the nightly build on TFS 2012?

This way we can build one solution against .NET 4.0 and .NET 4.5. If we keep the code compatible to each version this should be possible.

Dennis
  • 1,810
  • 3
  • 22
  • 42

2 Answers2

0

The msbuild task allows you to specify commandline arguments. So you could use the /p:TargetFramework=4.0 option to achieve compilation. However since you are essentially compiling the same project your second msbuild run overwrite the dlls generated from the first since they would have the same name. This is something you would need to handle.

allen
  • 4,627
  • 1
  • 22
  • 33
0

Check out this link How to target multiple versions of .NET Framework from MSBuild?. I recently had implement the same kind of solution. I'm sure how compliant this is with TFS best practices.

Community
  • 1
  • 1
Tanner Watson
  • 260
  • 3
  • 9