mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-03 21:23:38 +00:00
Error with net472 and v0.25 #397
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zplan on GitHub (May 14, 2020).
I have a net472 wpf application which references my own netstandard2.0 library. This library uses sharpcompress.
After updating sharpcompress to 0.25 in my library, the application is crashing.
Was this the intention of v0.25 that there is no support anymore for net472 framwork?
Error trace:
Pre-bind state information:
LOG: DisplayName = System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
(Fully-specified)
LOG: Appbase = file:///C:/MyProject/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : SharpCompress, Version=0.25.0.0, Culture=neutral, PublicKeyToken=afb0a02973931d96.
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\MyProject\bin\Debug\MyProject.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/MyProject/bin/Debug/System.Text.Encoding.CodePages.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
@adamhathcock commented on GitHub (May 14, 2020):
https://www.nuget.org/packages/SharpCompress/
Nuget clearly spells out what is supported and what the dependencies are. If your app is missing a file then I don’t know what to tell you.
@zplan commented on GitHub (May 14, 2020):
Thanks for your fast response.
I forget to mention that System.Text.Encoding.CodePages.DLL is in the debug folder, but all versions I tried (4.7.1/4.7.0/4.6.1/4.5.0/4.0.1/4.0.0...) were not successful --> error still occurs
And there is no 4.0.2 version on nuget org.
Error from the logger:
System.TypeInitializationException: The type initializer for 'SharpCompress.Common.ArchiveEncoding' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at SharpCompress.Common.ArchiveEncoding..cctor()
with:
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.7.1" />@adamhathcock commented on GitHub (May 14, 2020):
Seems like it's been built wrongly unless it's something silly like full framework is trying to use the netstandard20 reference when it should be using the net46 one.
Unfortunately, I don't have windows so I wont be able to help.
0.24 works fine for you?
@zplan commented on GitHub (May 14, 2020):
Yes. error occured when I updated from 0.24 to 0.25
@adamhathcock commented on GitHub (May 14, 2020):
I think I need to exclude the CodePages DLL just like in 0.24: https://github.com/adamhathcock/sharpcompress/pull/512
@adamhathcock commented on GitHub (May 22, 2020):
Released in https://www.nuget.org/packages/sharpcompress/0.25.1
@zplan commented on GitHub (May 26, 2020):
Thanks! --> It is working again.