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

Dependency on TimeZoneConverter 3.3.0 #64

Closed
kyle30312 opened this issue Feb 15, 2021 · 3 comments
Closed

Dependency on TimeZoneConverter 3.3.0 #64

kyle30312 opened this issue Feb 15, 2021 · 3 comments
Labels

Comments

@kyle30312
Copy link

Summary

  • My web app threw an exception after updating to TimeZoneConverter 3.4.0 (released two days ago)
  • TimeZoneNames 4.1.0 depends on TimeZoneConverter 3.3.0
  • Adding a binding redirect to my app's Web.config worked around the issue for me
  • Maybe need to update TimeZoneNames to depend on TimeZoneConverter 3.4.0?
  • My web app targets .NET Framework 4.8 (not sure if adding net48 as a target in the TimeZoneNames project file would help)

More info

Details

The exception I encountered:

System.IO.FileLoadException
  HResult=0x80131040
  Message=Could not load file or assembly 'TimeZoneConverter, Version=3.3.0.0, Culture=neutral, PublicKeyToken=e20ab7d0d9479841' 
    or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
  Source=TimeZoneNames
  StackTrace:
   at TimeZoneNames.TZNames.GetNames(String timeZoneId, String languageKey, Boolean abbreviations)
   at TimeZoneNames.TZNames.GetNamesForTimeZone(String timeZoneId, String languageCode)
…

In my app's build output, I found the following warning.

5>  No way to resolve conflict between "TimeZoneConverter, Version=3.4.0.0, Culture=neutral, PublicKeyToken=e20ab7d0d9479841" 
  and "TimeZoneConverter, Version=3.3.0.0, Culture=neutral, PublicKeyToken=e20ab7d0d9479841". 
  Choosing "TimeZoneConverter, Version=3.4.0.0, Culture=neutral, PublicKeyToken=e20ab7d0d9479841" arbitrarily.
5>  Consider app.config remapping of assembly "TimeZoneConverter, Culture=neutral, PublicKeyToken=e20ab7d0d9479841" 
  from Version "3.3.0.0" [] to Version "3.4.0.0" [(my-app-path)\bin\Debug\TimeZoneConverter.dll] to solve conflict and get rid of warning.
5>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2123,5): 
  warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning 
  (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: 
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="TimeZoneConverter" culture="neutral" publicKeyToken="e20ab7d0d9479841" />
      <bindingRedirect oldVersion="0.0.0.0-3.4.0.0" newVersion="3.4.0.0" />
    </dependentAssembly>
  </assemblyBinding>

And Visual Studio's Error List window showed the following.

Warning: Found conflicts between different versions of the same dependent assembly. 
In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; 
otherwise, add the following binding redirects to the "runtime" node in the application configuration file: 
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <dependentAssembly>
    <assemblyIdentity name="TimeZoneConverter" culture="neutral" publicKeyToken="e20ab7d0d9479841" />
    <bindingRedirect oldVersion="0.0.0.0-3.4.0.0" newVersion="3.4.0.0" />
  </dependentAssembly>
</assemblyBinding>
@mattjohnsonpint
Copy link
Owner

Sorry about that! I'll push an update for TimeZoneNames with a dependency update ASAP. Thanks.

@mattjohnsonpint
Copy link
Owner

Fixed in release 4.2.0. Thanks for reporting!

@kyle30312
Copy link
Author

Awesome - thanks for the quick update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants