1

I am trying to build my solution using MSBuild in the Command-Line instead of Visual Studio.

So, I have a Solution Configuration Build called "Installer - QA" which will generate the .exe file. However this solution configuration does not have a project configuration with the same name, so it is building all the projects.

msbuild solutionName.sln /p:Configuration="Installer - QA"

From what I understood this Configuration property sets the Project Configuration instead of Solution Configuration, then my project filter does not work.

It's funny because in Visual Studio works, is there a way to know how Visual Studio does?

Renato Pereira
  • 834
  • 2
  • 9
  • 22

1 Answers1

1

The solution I've found so far it's to build using "devenv.exe" as the following:

devenv solutionName.sln /rebuild "Installer - QA"

You will need to add the path to devenv.exe in the PATH environmental variable (e.g. "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE").

The only drawback I see in this solution is the need to install Visual Studio IDE at the remote server.

This post helped me to figure out this answer.

Renato Pereira
  • 834
  • 2
  • 9
  • 22