Unable to restore 'Microsoft.NETCore.App >= 2.0'
See original GitHub issueSteps to reproduce
Install the dotnet core normally
dotnet new console
Expected behavior
An application to be created
Actual behavior
Errors in /home/…/hwapp/hwapp.csproj Unable to resolve ‘Microsoft.NETCore.App (>= 2.0.0-preview2-25309-07)’ for ‘.NETCoreApp,Version=v2.0’.
Searching on nuget (https://www.nuget.org/packages/Microsoft.NETCore.App) I can see that the version 2.x is a pre release version, but I did not find any way of restore pre release dependency via dotnet restore
Environment data
dotnet --info
output:
.NET Command Line Tools (2.0.0-preview2-006065)
Product Information:
Version: 2.0.0-preview2-006065
Commit SHA-1 hash: 7f50f322d5
Runtime Environment:
OS Name: deepin
OS Version: 15.4
OS Platform: Linux
RID: debian.8-x64
Base Path: /opt/dotnet/sdk/2.0.0-preview2-006065/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0-preview2-25309-07
Build : 41f5fc94eedc889f086800c23f35bf14a8c75a9f
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Unable to restore 'Microsoft.NETCore.App >= 2.0' #8249
This happens because our offline cache hasn't been updated yet to contain these packages. The offline needs to be updated by asp.net and...
Read more >Unable to resolve 'Microsoft.NETCore.App (>= 2.0.0)' for '. ...
To fix this uninstall the nightly bits and installed the .NET Core Preview 1 SDK with VS2017 Preview. Additionally the ASP.NET and CoreFX...
Read more >Unable to publish using target framework netcore3.1 and ...
I have desktop WPF app written in C# and using NetCore3.1. When I try to publish it to a folder, using target runtime...
Read more >[error]Packages failed to restore in VSTS using .net core 2.0
Using .ASP.NET core template to create a build in VTST and running into error while system trying to GuNet Restore dependencies.
Read more >NuGet Warning NU1605
Solution. To the project exhibiting the restore warning, add a package reference to the higher version of the package. In the example above,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can also add a NuGet.Config to your repo like this:
One is the version of the tools (the first version above). The other is the version of the runtime on which the tool (CLI) runs.
You don’t have the same version of the runtime that you are targeting.