79541849

Date: 2025-03-28 15:47:50
Score: 0.5
Natty:
Report link

I finally fixed it and it works now.

In my project file, there is an ItemGroup that contains this:

<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid.EntityFrameworkAdapter" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.3">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
  <Publish>true</Publish>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0">
  <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
  <PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="9.0.0" />

What is shown here is what works. What DID NOT work was that in this section the package reference for Microsoft.VisualStudio.Web.CodeGeneration.Design said version 9.0.0. But, all the other package references said version 9.0.3.

In the NuGet package manager it showed all my packages as being up to date - including Microsoft.VisualStudio.Web.CodeGeneration.Design with 9.0.0 being the latest available for it.

I manually edited the csproj file and changed all the references that said 9.0.3 to 9.0.0 and then it started working again.

Reasons:
  • Blacklisted phrase (1): DID NOT work
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: StuartV