错误MSB3073 ...................以代码8退出

时间:2019-08-16 08:46:31

标签: c++ visual-studio-2013

我正在Visual Studio C ++ 2013中开发代码。我在cmake文件中遇到以下问题(我想是的),我试图对此代码进行大量搜索,但未能为此找到合适的解决方案。 / p>

运行测试代码

<!--******************************************************************************************* Build Events ******************************************************************************************* --> <PropertyGroup> <_BuildSuffix> :VCEnd</_BuildSuffix> </PropertyGroup> <Target Name="PreBuildEvent"

Condition="'$(PreBuildEventUseInBuild)'!='false'">

<Message Text="Description: %(PreBuildEvent.Message)" Condition="'%(PreBuildEvent.Message)' != '' and '%(PreBuildEvent.Command)' != ''"/> <Exec Command="%(PreBuildEvent.Command)$(_BuildSuffix)" Condition="'%(PreBuildEvent.Command)' != ''"/> </Target>

<Target Name="PreLinkEvent" Condition="'$(PreLinkEventUseInBuild)'!='false'"> <Message Text="Description: %(PreLinkEvent.Message)" Condition="'%(PreLinkEvent.Message)' != '' and '%(PreLinkEvent.Command)' != ''"/> <Exec Command="%(PreLinkEvent.Command)$(_BuildSuffix)" Condition="'%(PreLinkEvent.Command)' != ''"/> </Target>  <Target Name="PostBuildEvent" Condition="'$(PostBuildEventUseInBuild)'!='false'"> <Message Text="Description: %(PostBuildEvent.Message)" Condition="'%(PostBuildEvent.Message)' != '' and '%(PostBuildEvent.Command)' != ''"/> <Exec Command="%(PostBuildEvent.Command)$(_BuildSuffix)" Condition="'%(PostBuildEvent.Command)' != ''"/> </Target>

一种解决方案甚至建议在管理员模式下运行Visual Studio,但在这种情况下不起作用

以下是错误情况,我有一个成功构建的解决方案,但是当我尝试构建RUN_TESTS时,它显示以下错误:-

Error   1   error MSB3073: The command "setlocal
"C:\Program Files (x86)\CMake\bin\ctest.exe" --force-new-ctest-process -C Release
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 8. C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets   132  
5   RUN_TESTS

1 个答案:

答案 0 :(得分:1)

您似乎正在使用脚本作为命令。尝试将脚本写入批处理文件,然后将该批处理文件作为RUN_TESTS的命令调用。