Improve Error Message and/or Docs around InvariantGlobalization true by default #53678
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
design-proposal
This issue represents a design proposal for a different issue, linked in the description
NativeAOT
Milestone
I'd like to share some experience here. I just created a new webapi project and then added EF Core support. I didn't pay super close attention to the template's csproj file, as I assumed it would basically work as it has in the past. If I noticed the existence of this property it didn't jump out at me:
So, it came as a surprise to me when I had finished adding EF Core DbContext support and was using the CLI to create migrations, as I've done 100s of times in the past, and when I tried to update my localdb SQL Server I got this:
Now, knowing I'd just created this project I was 100% sure I hadn't specified "en-us" anywhere in my code to configure and set up my DbContext. There's nothing in this that suggests I should look at my Web API project. The stack trace only includes EF Core types. Fortunately, my search led me to the setting and issues like this one:
dotnet/SqlClient#2239
(and probably this issue's existence will help others as well)
Proposal
Improve the error message shown above to suggest checking the application's project file to see if
<InvariantCulture>
has been set and, if so, to remove that setting (or set it to false).Alternately, figure out a way to make local SQLServer development work with invariant culture.
The text was updated successfully, but these errors were encountered: