Closed clmcgrath closed 5 years ago
Can you share a complete project hitting this issue? I tried compiling a .net core 2.2 project using TimeZoneConverter 2.5.1 and ran it on Windows 10. It didn't reproduce your issue.
I get the same issue but with System.Runtime.InteropServices.RuntimeInformation.dll
. We've used this dll in our multi-project solution previously with no problems. Installing the TimeZoneConverter nuget upgraded it to the most recent nuget version (4.3.0), but then seems to complain about not being able to find the correct dll
Exception:
System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
Obviously not the exact same issue, but related. This is on a .NET Framework 4.6.2 project Edit: we also have a binding redirects in app.config
Edit #2: By taking the dll that lives deep in the nuget packages/
folder (4.6.24xxx in the properties details) and replacing it where our installer install the dlls (which was 4.6.26xxxx) magically makes everything work
Edit #3: Eventually just wiped out all of the changes, and manually installed/upgraded the RuntimeInfo nuget, installed the timezone nuget, and tested the install at each step. So unfortunately my only advice to others running into a simliar issue is to start over and do each step manually instead of letting nuget upgrade the dependencies for you.
@dot4qu - I've removed the dependency on System.Runtime.InteropServices.RuntimeInformation for all .NET Framework targets. This should fix the problem. Please try out release 3.0.0 and let me know if that resolves the issue. Thanks.
@clmcgrath - I also could not repro this on .NET Core 2.2. Please try again with release 3.0.0 and let me know if the problem persists. Thanks.
Closing this issue. If you are still having problems, please let me know and I'll re-open it. Thanks.
Doesn't seem to matter what i call i am getting a
TypeInitializationException
trying to loadSystem.Runtime.InteropServices.OSPlatform