Scaffold-DbContext – CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. par’name’ en-us is an invalid

You have to make changes in .csproj file of your project, need to add InvariantGlobalization attribute to false in PropertyGroup.

This is how it looks.

<PropertyGroup>
  <TargetFramework>net8.0</TargetFramework>
  <ImplicitUsings>enable</ImplicitUsings>
  <InvariantGlobalization>false</InvariantGlobalization>
</PropertyGroup>

Leave a Comment