Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Override InvariantGlobalization=true #162

Open
faramos opened this issue Nov 21, 2024 · 3 comments
Open

Cannot Override InvariantGlobalization=true #162

faramos opened this issue Nov 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@faramos
Copy link

faramos commented Nov 21, 2024

First of all, thank you for the great job with this library!

I’m encountering an issue with a library that relies on creating a CultureInfo object, which fails due to the globalization-invariant mode being enabled.

Exception Details:

System.Globalization.CultureNotFoundException: 
Message='Only the invariant culture is supported in globalization-invariant mode.

What I Tried:

I attempted to set System.Globalization.Invariant to false in my configuration, but this did not resolve the issue. Upon further investigation, I found that the Bootsharp.props file contains the following:

<InvariantGlobalization>true</InvariantGlobalization>

Question:

Is there any way to override InvariantGlobalization=true in the current setup? If not, are there alternative approaches to enable support for CultureInfo in the Wasm build?

Thank you for your help!

@elringus
Copy link
Owner

Afaik, props defined in the .csproj are supposed to override the defaults. Maybe something else is affecting this, like <BootsharpAggressiveTrimming>? https://github.com/elringus/bootsharp/blob/main/src/cs/Bootsharp/Build/Bootsharp.targets#L16

@elringus
Copy link
Owner

Though, it's also possible we are not bundling the icudt.dat and similar resources for the cultures to work. I never needed those myself, so didn't test that.

@elringus elringus added the bug Something isn't working label Nov 21, 2024
@faramos
Copy link
Author

faramos commented Nov 22, 2024

Though, it's also possible we are not bundling the icudt.dat and similar resources for the cultures to work. I never needed those myself, so didn't test that.

I think this might be the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants