LDJ
LDJ

Reputation: 7304

Building UWP apps on VSTS fails with MSBuild

I'm trying to set up CI builds for a Xamarin app using VSTS. The solution builds fine locally but in VSTS its failing on the build task on the UWP app. The android project builds fine in VSTS. As mentioned, everything builds and runs fine locally.

The only error I can see is:

##[error]Process 'msbuild.exe' exited with code '-1'.

Which doesn't help me much, when I look through the rest of the log file, which can be found here (I cant post it here as it doesn't format correctly and is unreadable)

Upvotes: 0

Views: 309

Answers (1)

Eddie Chen - MSFT
Eddie Chen - MSFT

Reputation: 29966

According to the error logs, you are building a UWP project which target to "15063" SDK on a Hosted Build Agent while the Win10 SDK installed on Hosted Agent is 14393 which cause the error.

2017-04-27T14:48:04.8813251Z   Could not use a link to copy "C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.15063.0\Windows.winmd" to "C:\a\1\s\MyProject\MyProject\MyProject.UWP\obj\x86\release\ilc\in\WinMetadata\Windows.winmd". Copying the file instead. Unspecified error
2017-04-27T14:48:04.8822945Z  
2017-04-27T14:48:04.8822945Z   'MyProject.UWP' violates pattern constraint of '\bms-resource:.{1,256}'

The workaround is deploying your own build agent and install 15063 SDK on it.

Upvotes: 0

Related Questions