visual-studio-2010 - Visual Studio 2010 中的 "Error MSB3073"- 构建后命令不处理换行符?

标签 visual-studio-2010 msbuild post-build-event

我在 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

在一台 PC 上这行得通,在另一台 PC 上行不通:我收到每一行的错误 MSB3037。

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

等等

一件奇怪的事情是,当我打开项目属性并查看我上面提到的构建后事件命令时 - 我看到的换行符是正方形。

会不会是换行的问题?

最佳答案

这是一个完全不同的问题(路径长度超过 256),它与构建后事件语法无关 - 所以这个问题应该完全删除。

关于visual-studio-2010 - Visual Studio 2010 中的 "Error MSB3073"- 构建后命令不处理换行符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11794400/

相关文章:

jenkins - 如何在构建后操作中设置多个选项 ->在 Jenkins 中构建其他项目?

visual-studio - Visual Studio Post-Build xcopy 不起作用 : error MSB3073: :"VCEnd" exited with code 4

c# - 无法在 WPF 应用程序 C# VS2010 中使用 SendKeys

php - 在 Windows 7 上从源代码编译 PHP, fatal error C1900

c++ - Visual Studio "cannot find the path specified"错误

asp.net-mvc-3 - ASP MVC 3 在构建服务器上缺少 WebApplication.targets

msbuild - 从 powershell 执行 msbuild 任务

c++ - `__declspec(align(#))` 是如何工作的?

MSBuild SignFile 任务返回 MSB3481 : The signing certificate could not be located

qt - 如何在不使用 QtCreator 的情况下将 dll 文件复制到 Qt 中的输出目录?