I have a build computer where Visual Studio not installed, only MSbuild which can build VS2008 projcets without having any Visual Studio installed.

I wonder whether it is possible to use MSbuild with VC++ 6.0 project files, although I am thinking this could not be possible. In the past I have used it with a VS2008 solution file for C++, but not for building C++ 6.0 dsw file.

For Vb6 we have an extension package for Msbuild (MSBuild.ExtensionPack.VisualStudio.VB6). Is anything similar available for C++ 6.0 projects?

An alternative could be if there are lightweight build tools that can built VC6++ .dsw files without having to install Visual Studio 6.0 ?


3 Answers 3


You can't compile C++6 without the C++6 compiler. However, once you install the command line support for the compiler/linker on the build server you will be able to access it from MSBuild or NAnt (worth a look). Also note that VS C++ 6 supported a build tool called nmake which shipped with VS. VS knew how to generate the nmake file for your project, and this might be worth looking into.

I doubt there is a C++ 6 compiler package out there that is separate from VS. Unlike C# and other .Net languages, Microsoft did not have to publish free compilers to gain traction. However, that does not mean you can't create one yourself. They now have C++ compilers (albeit somewhat crippled) for the later versions (VS 2008 and 2010).

You need to create a directory structure that is similar to MS Dev's directory structure, and copy all the relevant files. The command line tools do not require any special registry settings to be set. You will need the command line tools (compiler, linker, nmake, etc.), the header include libraries, and the .lib stubs to compile on a machine without MS Dev installed. It might be easiest to copy the install location and then remove the parts you don't need.

Your build tool (MSBuild, NAnt, or nmake) would use an environment variable to find the root directory of the C++ 6 tools, and then refer to them there. Using this approach, once the single environment variable is set on everyone's computer no changes have to be made between dev machines and the build machine. Your compiler will be able to find the system headers for includes, and the linker will be able to find the requisite .lib files for the DLLs you are using.


You should be able to call Visual Studio to compile through the following:

<Exec Command='"C:\program files\....\devenv.exe" /somearguments "path to your dsw file"'/>

and replacing the placeholders in my above code.

  • I have changed my question a bit (I was asking this on behalf of someone, and now I have got more info...). MSBuild have included compiler/linker for the ones that comes with VS2008. I know now that the build-coputer in question does dot actually have any version of Visual Studio installed. Only MSBuild.
    – awe
    Jan 26, 2011 at 8:22

It should be possible although not necessarily natively through Visual Studio. MSBuild is a generic script processor that can be used for many things and I don't see why you wouldn't be able to make it call the appropriate compilers, linkers, etc. However in the end you will have to install the tools that make something "VC++ 6.0" so I don't quite understand the hesitation about installing VC++6.0.

  • I have changed my question a bit (I was asking this on behalf of someone, and now I have got more info...). MSBuild have included compiler/linker for the ones that comes with VS2008 (without having VS2008 installed). It also exists a package as I said in the question for building VB6 projects in MSBuild.
    – awe
    Jan 26, 2011 at 8:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.