-
Notifications
You must be signed in to change notification settings - Fork 32
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
Windows Server 2016 - The type initializer for 'TimeZoneNames.TZNames' threw an exception. #65
Comments
tz.Id verified through logging is "Eastern Standard Time". The tz object is from TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time"); |
Nothing else should need to be installed. Could you please do some debugging on the application itself to see if I hit something similar a long time ago with #32, but that has been resolved. Could you please provide the specific exception name and message? I only see the stack trace. Thanks. (Also, you should probably be using the |
@robin-salih-fluke that is interesting. |
Any chance this is fixed? Exception Message: The type initializer for 'TimeZoneNames.TZNames' threw an exception." |
@akirby @robin-salih-fluke |
I'll take another look. Thanks. |
I have the following implementation in .NET Framework 4.7.1
which throws the following error with stack trace:
The type initializer for 'TimeZoneNames.TZNames' threw an exception.
at TimeZoneNames.TZNames.GetLanguageKey(String languageCode, Boolean forDisplayNames)
at TimeZoneNames.TZNames.GetAbbreviationsForTimeZone(String timeZoneId, String languageCode)
I have run windows update to ensure that I am current, but not sure if i need to install some other dependency on the server.
Running Get-Culture on the box returns
I have also run txutil to update the Timezone registry, but not sure if this is the correct step.
Please let me know if there is something else I can check on my server, as this code works on my dev machine.
The text was updated successfully, but these errors were encountered: