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.

Package dotnet-aspnet-codegenerator 5.0.2 is not compatible with netcoreapp3.1

See original GitHub issue

Hi i was following this guide First Web API but while doing this Scaffold a Controller I get this error please help. ` error NU1202: Package dotnet-aspnet-codegenerator 5.0.2 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1) / any. Package dotnet-aspnet-codegenerator 5.0.2 supports: net5.0 (.NETCoreApp,Version=v5.0) / any Tool ‘dotnet-aspnet-codegenerator’ failed to update due to the following: The tool package could not be restored. Tool ‘dotnet-aspnet-codegenerator’ 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 `

Issue Analytics

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

github_iconTop GitHub Comments

15reactions
deepchoudherycommented, Mar 5, 2021

Retry the "dotnet tool install -g dotnet-aspnet-codegenerator --version=“3.1.5” with the version parameter since you are targeting netcoreapp3.1. That should make it work.

0reactions
deepchoudherycommented, Apr 9, 2021

Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NuGet Package Manager attempting to add .NET 5.0 ...
AspNetCore.Diagnostics.EntityFrameworkCore 5.0.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package Microsoft.AspNetCore.
Read more >
dotnet-aspnet-codegenerator 7.0.9
Version Downloads Last updated 8.0.0‑preview.7.23408.2 99 6 days ago 8.0.0‑preview.6.23360.4 839 a month ago 8.0.0‑preview.5.23313.2 181 2 months ago
Read more >
dotnet aspnet-codegenerator command
This tool is intended for ASP.NET Core web projects with controllers and views. It's not intended for Razor Pages apps. Usage: dotnet aspnet- ......
Read more >
Fixing issue related to Package is not compatible with ...
Solution: Create a "NuGet Tool Installer" task​​ net core, which in my case was v2. 1. Happy coding!
Read more >
Trying to use .NET Core. Tool installs failing because of . ...
But when I try and install any tools or things through the dotnet command then I see this error. .... is not compatible...
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