I am trying to use MSBuild release mode, but it always defaults to debug. Any idea why?
msbuild LP.sln /p:buildmode=release
I checked through the following posts;
MSBuild task - Build fails because one solution being built in release instead of debug
MSBuild task configuration property
A Debug configuration supports the debugging of an app, and a Release configuration builds a version of the app that can be deployed.
Visual Studio projects have separate release and debug configurations for your program. You build the debug version for debugging and the release version for the final release distribution. In debug configuration, your program compiles with full symbolic debug information and no optimization.
The Microsoft Build Engine is a platform for building applications. This engine, which is also known as MSBuild, provides an XML schema for a project file that controls how the build platform processes and builds software.
When you use MSBuild.exe to build a project or solution file, you can include several switches to specify various aspects of the process. Every switch is available in two forms: -switch and /switch. The documentation only shows the -switch form. Switches are not case-sensitive.
That depends on the contents of that buildscript. Visual Studio C# uses the parameter Configuration to switch between Release and Debug. Not buildmode. You might want to try the following:
msbuild LP.sln /p:Configuration=Release
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With