How to use a specific Windows SDK with MSBuild?

Posted by Mac on Stack Overflow See other posts from Stack Overflow or by Mac
Published on 2010-06-10T15:26:43Z Indexed on 2010/06/10 15:32 UTC
Read the original article Hit count: 434

Filed under:
|
|

I have a large project made of many C++ and C# projects, and a MSBuild (3.5) script to build the whole thing. This script is based on the VCBuild (C++ projects) and MSBuild (C# projects) tasks. It is regularly executed by a Continuous Integration server.

I want to be able to select a specific Windows SDK (v6.0A, v7.0, v7.1...) to be used for compilation. As I have many branches in my repository that would ultimately need a different SDK version, I need a way to select the right one before each compilation.

On my computer, I have been able to setup a batch script that calls the right SetEnv.cmd before launching the MSBuild script. But this solution is not usable on the CI server as the MSBuild script is executed directly.

Do you know of a way to achieve the equivalent of SetEnv.cmd under MSBuild?

© Stack Overflow or respective owner

Related posts about msbuild

Related posts about compilation