I have: a .NET Core App, modified for VS 2017 and consuming a TFS Feed.
When it was in VS 2015, NuGet restore
was working fine.
Now using VS 2017, NuGet restore
it doesn't work returning a Failed to load msbuild Toolset
... Could not load file or assembly 'Microsoft.Build, Version=14.0.0.0
I also try to use dotnet restore
and I got a 401 (Unauthorized)
response.
Apparently NuGet restore
is the preferred way to do it, since it automatically authenticated for us, in order to use TFS Feed, but it seems to don't recognize VS 2017.
Sorry for the confusion, I forgot to mention that the problem is using CI/CD Visual Studio Team Services / Build. In my PC, it works fine because I had NuGet 4 (it come with VS 2017)... but online the NuGet versions available (with access to private feed) are: 3.3 and 3.5
After I added the nuget 4.0 to the build as @Cece-MSFT suggested, I still getting an error but without much detail. see screenshot:
Finally, some upgrades and there are 2 options, how to solve this:
You could use the nuget global config file of your build server located in %APPDATA%\NuGet\NuGet.Config
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With