0
votes

When I create a test solution with 2 WebForms apps and on Class Lib, check into Visual Studio Team Services, continuous deployment works and publishes to our staging slots as expected. TestSite1 and TestSite2 both build and publish on the two azure website staging deployment slots.

I accomplish the multiple websites scenario with a custom build configuration for each web app and edit each build definition like so: Any CPU|ReleaseSite1 for test site 1 and Any CPU|ReleaseSite2 for test site 2.

The moment I add any NuGet library, like Newtonsoft Json then the Team Services MSBuild server fails.

This also fails for any out of the box VS2015 MVC app as the Team Services Build Server can't find System.Web.Mvc.

All this is using new Azure preview portal, Framework 4.5.2

Build

Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException) 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) Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. default.aspx.cs (15, 0) The name 'Newtonsoft' does not exist in the current context

1
Do the Build Definitions perform a Nuget Restore? - DaveShaw
I don't see any setting relating to Nuget restore. There is a msbuild pre build scripts section. What would you enter there? Remember this is a cloud vso build server and not one we manage. - RandallTo
I thought the newer XAML builds on VSO did a Nuget Restore? Do you see it in the XAML / Diagnostic logs? - DaveShaw
I recently answered a question about enabling Nuget Restore on TFS: stackoverflow.com/questions/33565296/… - DaveShaw
This is the default xaml but I have seen messages advertising to use new webbased build system. Should I be using that? - RandallTo

1 Answers

0
votes

The queued builds actually runs on build agent machine. You need to add NuGet package restore to the build process, so that the required NuGet packages can be downloaded during the build process.

Please check my reply in this link for the detailed steps for both vNext build system and XAML build: Failure to build on VS Online because of Nuget, works locally