Creating a Visual Studio 2008 Solution from the Command Line

I am trying to automate the build process for a specific open source project. He will do an update in the SVN directory, use CMake to get the .sln file and build it. I can do it manually and make svn and cmake from the script package, but now I need to build a solution.

A quick Google search showed:

devenv /build release /project <projname> <solutionfile>.sln 

However, this uses the latest version of visual studio (Visual Studio Professional 2011), and the .sln file is for Visual C ++ Express 2008. I have both versions installed on my computer. Is there any devenv that I can use for Visual C ++ Express 2008? Or is there a command line argument to indicate which version to use?

UPDATE

I tried using msbuild, but I didn’t like creating the .vcproj files directly, and I didn’t want to create ALL the project files by creating the .sln file. I ended up using this:

 "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild.exe" <myproj>.vcproj "Release|Win32" 
+6
source share
2 answers

I think you are using the wrong tool to create it. Instead of trying to manage the IDE from the command line, you should just use msbuild.

 msbuild.exe projectname.proj /property:Configuration=Release 

To set up the environment for a specific version of MSVC, you need to call the vcvar.bat file from that particular version. This will create the necessary environment variables needed for the build tools.

+6
source

For Visual Studio Express 2008, the IDE is called VCExpress.exe. You must also specify the full path of the program if you have two versions installed:

 C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\VCExpress.exe /build release /project <projname> <solutionfile>.sln 
+2
source

Source: https://habr.com/ru/post/902025/


All Articles