简体   繁体   中英

Using MSBuild for C++ with VS2005

Is it possible to use the latest MSBuild (.NET4/VS2010) with the VS2005 toolchain?

I have a C++ project which compiles against VS2005. I'm not ready to upgrade to VS2010 while the compiler is still in beta. But I'd like to use the new version of MSBuild because it builds C++ natively and provides extension points and flexibility which the old VCBuild tool doesn't.

Does anyone know if you can use MSBuild this way? Or is MSBuild in .NET 4 coupled to the VS2010 toolchain?

Thanks in advance,

Ben

If you are not ready to upgrade to VS2010 because it is in Beta, are you not concerned that .NET 4.0 is beta? You can use MSBuild 4.0 to target other version of the .NET runtime (2.0 and above), but those tools are in beta as well.

You would have to convert your projects files to MSBuild 4.0 project files and then use those. The easiest way to do this is to open the solution file in Visual Studio 2010.

Sayed Ibrahim Hashimi

My Book: Inside the Microsoft Build Engine : Using MSBuild and Team Foundation Build

This answer is probably no longer interesting to you but in case anyone hits this on a search:

MSBuild as available with .net 4.0 can be used to build native c++ projects that target VS2010, VS2008 or (with a bit of customisation) VS2005

This is done by setting the Platform Toolset.

See the following blog post for a detailed description: http://blogs.msdn.com/b/vcblog/archive/2009/12/08/c-native-multi-targeting.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM