question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NuGet restore fails when encountering netcoreapp2.0 -> netstandard2.0 references

See original GitHub issue

It appears that the NuGet restore task in VSTS uses some old version of NuGet that is unable to deal with netcoreapp2.0 projects that reference netstandard2.0 projects.

This is running on a custom agent with VS 2017 update 3 and .NET Core SDK 2.0.0.

Directly invoking nuget.exe restore with NuGet 4.3.0 instead of using the NuGet task works fine. I would expect the NuGet task to also work fine here.

Task log attached: 4_NuGet restore.txt

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
infin8xcommented, Aug 23, 2017

If you’re using the NuGet Tool Installer task, you can use wildcards (e.g. 4.* or *) to always use the latest version available from https://dist.nuget.org. Note that things sometimes break or change between (even minor) versions, so this can introduce some instability to your build.

1reaction
chrispatcommented, Aug 23, 2017

If you need a more recent version of NuGet you need to specify that in your definition. Due to a wide variety of compatibility issues in NuGet.exe we can’t blindly update everyone to more recent versions

Read more comments on GitHub >

github_iconTop Results From Across the Web

Team Build Nuget restore failure with .NET Core 2.0 + . ...
I have a VS2017 solution that contains a .NET Core 2.0 console project that references a .NET Standard 2.0 class library, as well...
Read more >
Troubleshooting NuGet Package Restore in Visual Studio
This error occurs when you attempt to build a project that contains references to one or more NuGet packages, but those packages are...
Read more >
error netsdk1005 - You.com | The AI Search Engine ...
NuGet Manager version is 6.2.0. error NETSDK1005: Assets file doesn't have a target for 'netcoreapp3.1'. Ensure that restore has run and that you...
Read more >
Deep-dive into .NET Core primitives: deps.json ...
Without a runtimeconfig.json file, this will fail with. > dotnet Program.dll A fatal error was encountered. The library 'libhostpolicy.dylib' ...
Read more >
Even the simplest .NET Core project fails to build under ...
Obviously I'm referencing xUnit (2.2.0) via NuGet. This builds in VS (can't run it because it's a class library). However in NCrunch I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found