I am trying to run both release and Debug on .Net v4.0, where I have the MSBuild project file, not the solution file. I want to use the same build project file, but just override the Configuration property, switching between "Debug" and "Release".
When I do the following
c:\windows\microsoft.net\framework\v4.0.30319\msbuild.exe buildinv.proj
/target:rebuild "/property:Configuration=Debug" /verbosity:Diagnostic
I get the following error
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(483,9):
error : The OutputPath property is not set for project
'buildinv.proj'. Please check to make sure that you have specified a
valid combination of Configuration and Platform for this project.
Configuration='Debug' Platform=''.
I see that the error is occurring in _CheckForInvalidConfigurationAndPlatform.
If I pass the OutputPath property, it will work
c:\windows\microsoft.net\framework\v4.0.30319\msbuild.exe buildinv.proj
/target:rebuild "/property:Configuration=Debug" "/property:OutputPath=."
Is this a known bug? When I need to override the Configuration property, I will have to force override the OutputPath property, even if I do not want it.
Thanks in advance.
source
share