Is there a way to pass command line switches to devenv which are then passed as-is when it calls MSBuild?
You definitely can achieve this for /property (/p) key of msbuild. Open .csproj in as text (with notepad.exe): all combinations like $(somename) are properties of msbuild. They can be passed in command line of msbuild via /p:somename=somevalue, but they also can be passed to devenv through environment variable. For example: start Visual Studio Command prompt, in the command prompt type:
set semename=somevalue
devenv
Visual Studio will start. Load a solution of your choice, the property "somename" will be passed to all projects in this solution with the value "somevalue".
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