dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.62k stars 25.3k forks source link

Scaffold a controller instructions foe VS Code for .Net 6.0 #29303

Open ragavendra opened 1 year ago

ragavendra commented 1 year ago

The Scaffold a controller instructions for VS Code for the .Net 6.0 projects is having issues as some packages were not available for .net6.0 and some 7.0 packages could be installed for the .net6.0 project.

The below tool is not available for .Net6.0

dotnet tool install -g dotnet-aspnet-codegenerator

The below command did not work saying no .net 6.0 versions

dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design

The below two commands installed the 7.0 version packages for .net6.0 project.

dotnet add package Microsoft.EntityFrameworkCore.Design dotnet add package Microsoft.EntityFrameworkCore.SqlServer


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.


Associated WorkItem - 97035

wadepickett commented 1 year ago

Just some notes for me to refer back to: Versions 3-6 need to be each set to the specific versions of packages that were targeted for those versions at the time and each retested. When each of those versions for the topic were created, defaulting to the latest work and helped make sure folks had the latest new minor update as it became available later in the year, but that is not reliable once a new major version is reached.

Rick-Anderson commented 1 year ago

@wadepickett this is not high priority and the fix shouldn't take 3-5 days. Customers that want to run older versions should have that older version SDK installed and not newer versions. At most have a note:

If you're targeting an older version of ASP.NET Core than the SDK installed, append the version number you'd like to install. You can get the version number .....

We need to be working on the 8.0 release, not updating version 3.

Make an include file with the generic instructions and you add the include as needed.

wadepickett commented 1 year ago

@Rick-Anderson, actually it is not as simple as that. I assumed that would be the action for this as well. What I discovered was that the combination of required packages were wrong to begin with on the older versions of the topic. They were changed at some point to reflect the newer combination which is incorrect. The rest I agree with.