Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve "Globalization Invariant Mode is not supported" without adding the ICU libraries on the docker container?

We are working on a .NET microservices project for a client which will deploy it on Linux docker containers.

After using the client's sdk-alpine as a base image for docker containers we encountered this problem when trying to connect to SQL server:

"Globalization Invariant Mode is not supported"

we are using: .NET 7 and Microsoft.EntityFrameworkCore.SqlServer Version 7.0.13

I have searched and found that alpine does not contain ICU libraries so I added them and it worked, However we can't add new libraries (for some reason unknown to me). So now I'm trying to find another solution if it exists before jumping and telling them there is no other way. Is there a way to enable global invariant or

I tried enabling NLS instead of ICU in docker-compose 'DOTNET_SYSTEM_GLOBALIZATION_USENLS=true' however still not working

like image 401
Q.Aimad Avatar asked Oct 31 '25 16:10

Q.Aimad


1 Answers

Removing the following from the Project file resolves the error: <InvariantGlobalization>true</InvariantGlobalization>

Originally posted as comment by Prashant Rajput.

like image 157
Ghostyshka Avatar answered Nov 02 '25 06:11

Ghostyshka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!