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.

Can't install tools targeting 3.1

See original GitHub issue

Steps to reproduce

dotnet tool install dotnet-ef --version 3.1.0-preview1.19506.2

Expected behavior

Tool 'dotnet-ef' (version '3.1.0-preview1.19506.2') was successfully installed.

Actual behavior

error NU1202: Package dotnet-ef 3.1.0-preview1.19506.2 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1) / any. Package dotnet-ef 3.1.0-preview1.19506.2 supports: netcoreapp3.1 (.NETCoreApp,Version=v3.1)
The tool package could not be restored.
Tool 'dotnet-ef' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   3.1.100-preview2-014486
 Commit:    343b2cba36

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18362
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Users\brice\AppData\Local\Microsoft\dotnet\sdk\3.1.100-preview2-014486\

Host (useful for support):
  Version: 3.1.0-preview2.19517.10
  Commit:  3daa0867ab

.NET Core SDKs installed:
  3.1.100-preview2-014486 [C:\Users\brice\AppData\Local\Microsoft\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.1.0-preview2.19517.21 [C:\Users\brice\AppData\Local\Microsoft\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.0-preview2.19517.10 [C:\Users\brice\AppData\Local\Microsoft\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.0-preview2.19517.10 [C:\Users\brice\AppData\Local\Microsoft\dotnet\shared\Microsoft.WindowsDesktop.App]

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

cc @ajcvickers @Pilchie

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:14 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
zivkancommented, Oct 24, 2019

We talked about it, but haven’t made the change yet.

However, when I do dotnet new console, dotnet add package newtonsoft.json, edit the csproj to use PackAsTool and then run dotnet pack, I don’t get the warning because the generated nupkg doesn’t have any dependencies.

This suggests that @bricelam’s package does have NuGet dependencies, which itself doesn’t make a lot of sense for a tool as they’re supposed to be self-contained, right?

1reaction
wli3commented, Oct 23, 2019

There is an extra lib folder inside the root of the nupkg

Read more comments on GitHub >

github_iconTop Results From Across the Web

asp.net - The current .NET SDK does not support targeting . ...
(Build clean was failing.) I first got the error after trying to add new items to my project and it didn't go away...
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 >
Visual Studio 2019 not recognizing newly installed .Net ...
Install Visual Studio 16.6.5 and make sure .NET Core 3.1 components are selected. · Launch Visual Studio. Click Tools->Optiones->Environment-> ...
Read more >
How can I install dotnet Core 3.1 runtime on Ubuntu 22.04?
1 downloaded from packages.ubuntu.com/focus, and aspnetcore-runtime-3.1 from microsoft . But dotnet --info : .NET SDK (reflecting any global.
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 >

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