mattjohnsonpint / TimeZoneNames

Provides a complete source of localized time zone names and abbreviations.
MIT License
196 stars 32 forks source link

Dependency on TimeZoneConverter 3.3.0 #64

Closed kyle30312 closed 3 years ago

kyle30312 commented 3 years ago

Summary

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 commented 3 years ago

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

mattjohnsonpint commented 3 years ago

Fixed in release 4.2.0. Thanks for reporting!

kyle30312 commented 3 years ago

Awesome - thanks for the quick update!