I cannot see why the below build is failing.
The project builds successfully.
What could "##[error]Unexpected exit code received from msbuild.exe: 1" result from in the below output?
Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\tasks\VSBuild\1.0.13\VSBuild.ps1
C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe "C:\a\8ac4a4f6\Root\src\MyProject.Api\MyProject.Api.xproj" /nologo /m /nr:false /fl /flp:"logfile=C:\a\8ac4a4f6\Root\src\MyProject.Api\MyProject.Api.xproj.log" /dl:CentralLogger,"C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /t:Build,FileSystemPublish /p:PublishConfiguration=release /p:PublishOutputPathNoTrailingSlash=C:\a\8ac4a4f6\Root\MyProject\artifacts\bin\release\Publish /p:platform="any cpu" /p:configuration="release" /p:VisualStudioVersion="14.0"
Build started 8/3/2015 9:27:34 AM.
1>Project "C:\a\8ac4a4f6\Root\src\MyProject.Api\MyProject.Api.xproj" on node 1 (Build;FileSystemPublish target(s)).
1>PrepareForBuild:
Creating directory "..\artifacts\bin\MyProject.Api\".
Creating directory "..\artifacts\obj\MyProject.Api\any cpu\release\".
PreComputeCompileTypeScript:
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\tsc.exe --noEmitOnError COMPUTE_PATHS_ONLY
CompileTypeScript:
Skipping target "CompileTypeScript" because it has no outputs.
CoreCompile:
C:\Users\buildguest\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnx.exe --appbase "C:\a\8ac4a4f6\Root\src\MyProject.Api" "C:\Users\buildguest\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\lib\Microsoft.Framework.PackageManager\Microsoft.Framework.PackageManager.dll" pack "C:\a\8ac4a4f6\Root\src\MyProject.Api" --configuration release --out "..\artifacts\bin\MyProject.Api"
Microsoft .NET Development Utility CLR-x86-1.0.0-beta6-12256
Building MyProject.Api for DNX,Version=v4.5.1
Using Project dependency MyProject.Api 1.0.0
Source: C:\a\8ac4a4f6\Root\src\MyProject.Api\project.json
Using Project dependency MyProject.Domain.Model 1.0.0
Source: C:\a\8ac4a4f6\Root\src\MyProject.Domain.Model\project.json
... (deleted for readability)
Using Assembly dependency framework/fx/mscorlib 4.0.0.0
Source: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\mscorlib.dll
Using Assembly dependency framework/fx/System 4.0.0.0
Source: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.dll
... (deleted for readability)
The following commands will not be exported for global install: web.
MyProject.Api -> C:\a\8ac4a4f6\Root\src\artifacts\bin\MyProject.Api\release\MyProject.Api.1.0.0.nupkg
MyProject.Api -> C:\a\8ac4a4f6\Root\src\artifacts\bin\MyProject.Api\release\MyProject.Api.1.0.0.symbols.nupkg
Build succeeded.
0 Warning(s)
0 Error(s)
Time elapsed 00:00:09.0953302
Total build time elapsed: 00:00:09.1660739
Total projects built: 1
GetTypeScriptCopyToOutputDirectoryItems:
Adding items with BuildAction=TypeScriptCompile to the same collections that will be populated (with items of other BuildActions) by the GetCopyToOutputDirectoryItems target
GatherAllFilesToPublish:
Environment variables:
Path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\extensions\microsoft\web tools\external;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Users\VssAdministrator\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\NPM\Modules;C:\Program Files\nodejs\;C:\NPM\Modules;C:\cordova;C:\java\ant\apache-ant-1.9.4\bin;;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\extensions\microsoft\web tools\external\.git
C:\Users\buildguest\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta6\bin\dnu.cmd publish "C:\a\8ac4a4f6\Root\src\MyProject.Api" --out "C:\a\8ac4a4f6\Root\MyProject\artifacts\bin\release\Publish" --configuration release --runtime dnx-clr-win-x86.1.0.0-beta6 --quiet
Microsoft .NET Development Utility CLR-x86-1.0.0-beta6-12256
Copying to output path C:\a\8ac4a4f6\Root\MyProject\artifacts\bin\release\Publish
Time elapsed 00:00:07.6405449
1>Done Building Project "C:\a\8ac4a4f6\Root\src\MyProject.Api\MyProject.Api.xproj" (Build;FileSystemPublish target(s)) -- FAILED.
Build FAILED.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:19.07
##[error]Unexpected exit code received from msbuild.exe: 1
global.json:
{
"sources": [ "src", "test" ],
"sdk": {
"version": "1.0.0-beta6",
"runtime": "clr",
"architecture": "x86"
}
}
project.json:
{
"webroot": "wwwroot",
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.Server.IIS": "1.0.0-beta6",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta6",
"Microsoft.AspNet.Mvc": "6.0.0-beta6"
},
"commands": {
"web": "Microsoft.AspNet.Hosting --config hosting.ini"
},
"frameworks": {
"dnx451": { }
},
"publishExclude": [
"node_modules",
"bower_components",
"**.xproj",
"**.user",
"**.vspscc"
],
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
]
}
EDIT:
Removing the following arguments from msbuild.exe leads to a successful build:
/t:Build,FileSystemPublish /p:PublishConfiguration=release /p:PublishOutputPathNoTrailingSlash=C:\a\8ac4a4f6\Root\MyProject\artifacts\bin\release\Publish
There is clearly something wrong with my publish arguments.