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.

dotNet Core SDK 3.1.100 failing to restore because of bad versions

See original GitHub issue

Issue Description

On a brand new install of dotNet Core SDK 3.1.100 for Windows 10 x64, It seems to be missing dependencies with the install. Should I need to include other feeds to get the dotnet restore to work after doing a dotnet new xunit? I was following this document: Organizing and testing projects with the .NET Core command line. Some of the references are a little old so maybe something changed?

Steps performed

dotnet new xunit
dotnet restore

System Information

C:\Users\Phillip\Desktop\dotNetCore\01_NewTypes\test\NewTypesTests>systeminfo

Host Name:                 FENIX
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.18362 N/A Build 18362
OS Manufacturer:           Microsoft Corporation

dotnet Errors

C:\Users\Phillip\Desktop\dotNetCore\01_NewTypes\test\NewTypesTests>dotnet restore 
Restore completed in 25.54 ms for C:\Users\Phillip\Desktop\dotNetCore\01_NewTypes\src\NewTypes\NewTypes.csproj.
C:\Users\Phillip\Desktop\dotNetCore\01_NewTypes\test\NewTypesTests\NewTypesTests.csproj : error NU1100: Unable to resolve 'Microsoft.NET.Test.Sdk (>= 16.2.0)' for '.NETCoreApp,Version=v3.1'.
C:\Users\Phillip\Desktop\dotNetCore\01_NewTypes\test\NewTypesTests\NewTypesTests.csproj : error NU1100: Unable to resolve 'xunit (>= 2.4.0)' for '.NETCoreApp,Version=v3.1'.
C:\Users\Phillip\Desktop\dotNetCore\01_NewTypes\test\NewTypesTests\NewTypesTests.csproj : error NU1100: Unable to resolve 'xunit.runner.visualstudio (>= 2.4.0)' for '.NETCoreApp,Version=v3.1'.
C:\Users\Phillip\Desktop\dotNetCore\01_NewTypes\test\NewTypesTests\NewTypesTests.csproj : error NU1100: Unable to resolve 'coverlet.collector (>= 1.0.1)' for '.NETCoreApp,Version=v3.1'.
  Restore failed in 150.83 ms for C:\Users\Phillip\Desktop\dotNetCore\01_NewTypes\test\NewTypesTests\NewTypesTests.csproj.

dotnet information

C:\Users\Phillip\Desktop\dotNetCore\01_NewTypes\test\NewTypesTests>dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.100
 Commit:    cd82f021f4

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18362
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.1.100\

Host (useful for support):
  Version: 3.1.0
  Commit:  65f04fb6db

.NET Core SDKs installed:
  3.1.100 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

54reactions
FilBot3commented, Mar 20, 2020

I used the following to get my dotnet nuget sources setup. Then it worked.

dotnet nuget add source --name nuget.org https://api.nuget.org/v3/index.json

Then the restore worked. Thank you coding|blocks community.

4reactions
mpaz-kaizenteccommented, Jul 7, 2020

I used the following to get my dotnet nuget sources setup. Then it worked.

dotnet nuget add source --name nuget.org https://api.nuget.org/v3/index.json

Then the restore worked. Thank you coding|blocks community.

It works!! thanks for share!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dotnet restore failed on .net core 3.1 - C#
I have a microservices based application with one solution but it has several projects - 5 exactly. I have some test that I'd...
Read more >
The current .NET SDK does not support targeting . ...
NET SDK does not support targeting .NET Core 2.1. Either target .NET Core 2.0 or lower, or use a version of the .NET...
Read more >
Visual Studio 2019 unable to locate .Net Core SDK
Step 1) First run dotnet --list-sdks from the command line (as in Grzegorz Smulko's answer). Take note of the greatest version number.
Read more >
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 >
NETSDK1141: Unable to resolve the .NET SDK version as ...
NET SDK error NETSDK1141, which occurs when the SDK version could not be resolved in global.json. ... NET Core 5.0 SDK and later...
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