I've been successfully deploying an ASP.Net MVC Azure-based website via Visual Studio Online's build pipeline for weeks. I then added an ApiController class and Visual Studio installed some related NuGet packages. Now, when I check in and the build starts, I get failures due to a missing System.Web.Http dll.
I have tried reinstalling the NuGet package and also marking the missing dlls as 'Copy Local'. Still no joy.
The Build step first reports a warning:
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets (1819, 5) Could not resolve this reference. Could not locate the assembly "System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
It then reports a number of errors and fails:
[Solution Name][Website Name]\App_Start\WebApiConfig.cs (1, 18) The type or namespace name 'Http' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
I am using Visual Studio 2015 RC and .Net 4.6 (although dropping down to v4.5.2 still produces the error).
For now I have to manually Publish this. Anyone got any ideas please?