-
Notifications
You must be signed in to change notification settings - Fork 82
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
.NET 6 gotcha #107
Comments
What a pain in the ass. |
@ntimmerman Yeah, it totally is. I was really happy when I've heard they've added this to .NET 6, but then i've actually tried it and went to the rabbit hole of the small print :) |
Any idea why the exception for current versions of windows server? We devs just want a write once, run anywhere experience without exceptions. |
It all boils down to ICU.dll not being present on those older platforms. Reading: https://devblogs.microsoft.com/dotnet/date-time-and-time-zone-enhancements-in-net-6/#time-zone-conversion-apis |
It seems like the obvious solution is for Microsoft to put both on Windows Server (add ICU via patch) and allow the .net developer to specify which underlying lib to use. Or am I missing something? |
hard to say. If you ask me, it should without requiring any 3rd party stuff apart of (maybe) a MS provided-nuget package. I have not idea why they've decided to do it this way :) |
Thanks for bringing this up. Yes, the built-in .NET 6 support requires ICU in one form or another. Don't worry, I'll not be killing this project any time soon. I am a little bit behind on maintenance, but I'll catch up soon and will update that note to clarify the ICU dependency for the built-in solution. Thanks. |
I added a note to the readme about ICU support for .NET 6. |
Just a thank you to @mattjohnsonpint for continuing to support this project. The .NET 6 solution/workaround really adds an unnecessary layer of complexity to any project that is hosted on an Azure App Service. This approach is much preferred |
Readme file for this project states this:
This is only partially true. The gotcha is that .NET 6 IANA support only works when you run your app on Windows 10 1903 and higher. Windows Server 2016 & 2019 are not supported (it works on Windows Server 2022 though). If you want to use this feature on those OSes you need to carry around icu.dll by adding this to you project file:
and you need to do that in every .exe-producing project, you cannot just put in some shared DLL as it would not be applied. This also means that your unit tests DLLs will not work on those unsupported OSes no matter what.
So, i guess it's a bit too early to let this project die :). And I think it would be a good idea to add this word of caution about .NET 6 gotchas to the readme.
Thanks for the great library!
The text was updated successfully, but these errors were encountered: