When i build locally it works, but my VSTS hosted 2017 instance build fails with the following message:
[error]apps\Ascend.Identity\AccountController.cs(126,17): Error CS0012: The type 'HttpRequestMessage' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Locally, there is also a yellow triangle in the reference list.
but it still builds
and the reference is there in csproj
and the package is restored from nuget (packages.config)
<package id="System.Net.Http" version="4.3.3" targetFramework="net472" />
In your local, try the steps below:
packages
folder in your source directory.System.Net.Http
reference.References
, selectManage Nuget Packages
, browser and install packageSystem.Net.Http
.