While creating a web API project, the version of Nuget on the Hosted Build Agents does not work with this mix of core and framework. In order to fix this, follow these steps:
Add a variable called NugetDownloadUrl with a value
Add a PowerShell task to download the Release Candidate nuget. Use the following command:
Add a standard Nuget restore task pointed explicitly at NuGet.exe file that was downloaded:
After this, compile your project, it will compile your dotnet framework projects and restore the dotnet core packages.