Я пытаюсь использовать сборку TFS для запуска командного файла 'tt.bat', это очень типовой командный файл, он просто создает папку. mkdir d:\ttt Пакетный файл работает правильно, но когда я собираю его с VS 2013, я получаю сообщение об ошибке, вот журнал:
Компиляция, тестирование и публикация00:00:06
Run optional script before MSBuild00:00:00
Run MSBuild00:00:01
C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\nuget.exe restore "C:\Builds\1\Test2\CIB2\src\Solution1.sln" -NonInteractive
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe /nologo /noconsolelogger "C:\Builds\1\Test2\CIB2\src\Solution1.sln" /nr:False /fl /flp:"logfile=C:\Builds\1\Test2\CIB2\src\Solution1.log;encoding=Unicode;verbosity=normal" /p:SkipInvalidConfigurations=true /m /p:OutDir="C:\Builds\1\Test2\CIB2\bin\\" /p:VCBuildOverride="C:\Builds\1\Test2\CIB2\src\Solution1.sln.vsprops" /dl:WorkflowCentralLogger,"C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;BuildUri=vstfs:///Build/Build/36;InformationNodeId=12;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;TFSUrl=http://localhost:8080/tfs/DefaultCollection;"*WorkflowForwardingLogger,"C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;" /p:BuildId="6da97dfb-9620-440e-9dcc-c177a2e0ab90,vstfs:///Build/Build/36" /p:BuildLabel="CIB2_20151104.2" /p:BuildTimestamp="Wed, 04 Nov 2015 08:47:52 GMT" /p:BuildSourceVersion="LCIB2_20151104.2@$/Test2" /p:BuildDefinition="CIB2"
Run optional script after MSBuild00:00:05
C:\Builds\1\Test2\CIB2\src\tt.bat
C:\Builds\1\Test2\CIB2\src>mkdir d:\ttt
The device is not ready.
Exception Message: TF270015: 'tt.bat' returned an unexpected exit code. Expected '0'; actual '1'. See the build logs for more details. (type UnexpectedExitCodeException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)