C
C#6mo ago
Sk

✅ Keep getting this error when trying to do "Update-Database":

This is the error i get: "Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name') en-us is an invalid culture identifier."
Globalization config settings - .NET
Learn about run-time settings that configure globalization aspects of a .NET Core app, for example, how it parses Japanese dates.
14 Replies
Sk
Sk6mo ago
whats the best way to fix this?
Thinker
Thinker6mo ago
Seems pretty straightforward? Since the app doesn't have access to globalization info, only the invariant culture works. I assume you explicitly enabled this option yourself?
Sk
Sk6mo ago
no, im following a tutorial atm as im just beginning to learn web api
Thinker
Thinker6mo ago
Where are you getting the error exactly?
Sk
Sk6mo ago
what do you mean? sorry my english is still kinda bad
Thinker
Thinker6mo ago
When does the error happen Is it a runtime exception? A compilation error?
Sk
Sk6mo ago
when i try "update-database" so runtime i think
Thinker
Thinker6mo ago
Okay what does the entire error say?
Sk
Sk6mo ago
Thinker
Thinker6mo ago
Run dotnet ef database update --help in a terminal, there should be an option to specify the culture to use
Sk
Sk6mo ago
Thinker
Thinker6mo ago
Actually you can probably do update-database --help in the package manager console I thought update-database was just an alias for dotnet ef database update, but apparently not
Sk
Sk6mo ago
which one of these should i choose? nvm, thanks for the help fixed it. you can find it in your project settings and set it to fals
jcotton42
jcotton426mo ago
powershell command, it would be -? or get-help update-database