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.

.NET SDK 5.0.202 fails to compile netcoreapp3.1 projects

See original GitHub issue

Using the .NET 5.0.202 SDK to compile a project targeting netcoreapp3.1 fails with the following errors:

error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.win-x64 with version (= 3.1.14)
error NU1102: Unable to find package Microsoft.WindowsDesktop.App.Runtime.win-x64 with version (= 3.1.14)
error NU1102: Unable to find package Microsoft.AspNetCore.App.Runtime.win-x64 with version (= 3.1.14)

It looks like with .NET 5.0.5 being released a week earlier than usual, it has dependencies on the 3.1 release for next Tuesday that haven’t been published to NuGet.org yet.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Shane32commented, Apr 7, 2021

Possibly related, also having a different package restore issue on Windows builds in GitHub Actions where it fails without a NuGet.config file being present in the repo. See the following two PRs for examples.

I am still getting what appears to be the same nuget restore error message with GitHub Action workflows on Windows platforms. Linux platforms (same code, same workflow, same everything) runs fine.

Reverting to SDK 5.0.201 corrects the error and builds properly on both platforms; you can see in the latter PR that changing the SDK version was all that was required to make it build successfully. You can also see that nuget package restore was completed successfully on Linux even though the run was canceled due to the failure on the Windows run.

0reactions
marcpopMSFTcommented, Apr 15, 2021

GitHub Actions has confirmed that they’ve rolled out a fix to remove an empty Nuget.config file that was still causing issues for some customers (as NuGet also made a change to not automatically include NuGet.org when an empty NuGet.config file is found). We believe this should be resolved now thought they warn that any users for the choco package manager may still be broken because that manager also creates an empty Nuget.config. Closing this issue. Please reactivate if you still see issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >
Can the .NET 5 SDK be used to compile .NET Core 3.1 ...
Yes the .NET 5 SDK can and will readily compile .NET Core 3.1 projects. You need to set <TargetFramework> appropriately.
Read more >
The Current .NET SDK does not support targeting . ...
How to work around a common .NET Core compilation targeting error using .NET Core 3 SDK and .NET Core 3 projects with Visual...
Read more >
MSBuild uses .Net 5.0 SDK or .Net core SDKs for . ...
Net 5.0 SDK or .Net core SDKs instead of .Net framework SDK for building net48 .csproj-s in the new netcore-like format. And it...
Read more >
Solution to Visual Studio 2022 messing up ...
Our .NET 5 and .NET Standard 2 projects couldn't be loaded anymore in Visual Studio 2019. The error shown when attempting to load...
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