visual studio - Why outputting 'error: ' in Post-Build Event breaks my build in VS2012? -
adding
cmd.exe /c "echo error : unexplainable"
causes this:
1>------ build started: project: xxx, configuration: debug win32 ------ 1>exec : error : unexplainable 1>c:\program files (x86)\msbuild\microsoft.cpp\v4.0\v110\microsoft.cppcommon.targets(134,5): error msb3073: command "cmd.exe /c "echo error : unexplainable" 1>c:\program files (x86)\msbuild\microsoft.cpp\v4.0\v110\microsoft.cppcommon.targets(134,5): error msb3073: :vcend" exited code -1. ========== build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
it happens when 'error' string followed ':' character.
it bug in msbuild: https://github.com/microsoft/msbuild/issues/766
the 'exec' task used 'postbuildevent' target should have 'ignorestandarderrorwarningformat' set true default doesn't, fails when finding 'error:' in output.
an unreliable way fix modify 'postbuildevent' target in c:\program files (x86)\msbuild\microsoft.cpp\v4.0\v110\microsoft.cppcommon.targets
(at line 134) adding ignorestandarderrorwarningformat="true"
'exec' task
override predefined 'postbuildevent' in project here: can include .targets file in .props property sheet?
Comments
Post a Comment