If there is a mismatch between the version number of Microsoft.EntityFrameworkCore.Design (in my case 7.0.4) that the user installs as part of the tutorial and Microsoft.VisualStudio.Web.CodeGeneration.Design (in my case 6.0.13) that is installed as part of Visual studio, the user will get an error saying:
There was an error running the selected code generator:
'Install the package Microsoft.VisualStudio.Web.CodeGeneration.Design and try again.'
It seems that this can occur in cases where a user may have had VS installed for a little while, and the latest stable version of Microsoft.EntityFrameworkCore.Design has moved one (or maybe more) major version ahead of the Microsoft.VisualStudio.Web.CodeGeneration.Design that seems to be pre-installed. In my case one of the packages was on version 6 and the other I installed version 7
The error is confusing because it implies that Microsoft.VisualStudio.Web.CodeGeneration.Design is not installed at all, so when the user checks and sees that this package is installed, they will likely not immediately spot the issue of version mismatches.
Alternatively the error may have occurred for some other reason that I wasn't able to identify, and was resolved when I made the package major versions match (downgrading Microsoft.EntityFrameworkCore.Design to match the major version in the tutorial, which is 6), so the description above is my best guess as to what the error was and how my solution solved that error.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
ID: 6719f08e-3bd7-dc1a-71df-f2ef9fbca9d8
Version Independent ID: 7096fdb3-612e-9e00-bd0b-8ea4886a09ce
If there is a mismatch between the version number of
Microsoft.EntityFrameworkCore.Design
(in my case 7.0.4) that the user installs as part of the tutorial andMicrosoft.VisualStudio.Web.CodeGeneration.Design
(in my case 6.0.13) that is installed as part of Visual studio, the user will get an error saying: There was an error running the selected code generator: 'Install the package Microsoft.VisualStudio.Web.CodeGeneration.Design and try again.'It seems that this can occur in cases where a user may have had VS installed for a little while, and the latest stable version of
Microsoft.EntityFrameworkCore.Design
has moved one (or maybe more) major version ahead of theMicrosoft.VisualStudio.Web.CodeGeneration.Design
that seems to be pre-installed. In my case one of the packages was on version 6 and the other I installed version 7The error is confusing because it implies that
Microsoft.VisualStudio.Web.CodeGeneration.Design
is not installed at all, so when the user checks and sees that this package is installed, they will likely not immediately spot the issue of version mismatches.Alternatively the error may have occurred for some other reason that I wasn't able to identify, and was resolved when I made the package major versions match (downgrading
Microsoft.EntityFrameworkCore.Design
to match the major version in the tutorial, which is 6), so the description above is my best guess as to what the error was and how my solution solved that error.Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.