Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Error MSB3073" in Visual Studio 2010 - post-build command dosen't handle line breaks?

I have a post build command in Visual Studio 2010:

setlocal
cd D:\1.5\BINZ
if %errorlevel% neq 0 goto :cmEnd
D:
if %errorlevel% neq 0 goto :cmEnd
"C:\Program Files\CMake 2.8\bin\cpack.exe" -C $(Configuration) --config ./CPackConfig.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd

On one PC this works, on another doesn't: I get error MSB3037 for every line.

3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command "setlocal

3>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: cd D:\1.5\BINZ

etc.

One strange thing is that when I open project properties and look into Post-build event command that I stated above - the line breaks I see as squares.

Could it be a problem with line breaks?

like image 440
Danijel Avatar asked Jan 27 '26 18:01

Danijel


1 Answers

It was a totally different problem (path length longer than 256), it had nothing to do with post-build event syntax - so this question should be removed altogether.

like image 192
Danijel Avatar answered Feb 01 '26 02:02

Danijel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!