0.32.2: System.IO.FileLoadException: Could not load file or assembly SharpCompress #534

Closed
opened 2026-01-29 22:13:25 +00:00 by claunia · 3 comments
Owner

Originally created by @hhyyrylainen on GitHub (Sep 7, 2022).

I get the following exception whenever I try to use any sharpcompress code:

System.IO.FileLoadException: Could not load file or assembly 'SharpCompress, Version=0.32.2.0, Culture=neutral, PublicKeyToken=afb0a02973931d96'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'SharpCompress, Version=0.32.2.0, Culture=neutral, PublicKeyToken=afb0a02973931d96'

However, this seems to happen only with the latest version on nuget. When using the older version 0.32.1 I don't get any such errors and can create compressed files just fine.

I found this already closed issue when trying to find what the problem was: https://github.com/adamhathcock/sharpcompress/issues/591 so perhaps a similar issue has popped up again?

I'm using dotnet 6.0.108 on Linux.

Originally created by @hhyyrylainen on GitHub (Sep 7, 2022). I get the following exception whenever I try to use any sharpcompress code: ``` System.IO.FileLoadException: Could not load file or assembly 'SharpCompress, Version=0.32.2.0, Culture=neutral, PublicKeyToken=afb0a02973931d96'. The located assembly's manifest definition does not match the assembly reference. (0x80131040) File name: 'SharpCompress, Version=0.32.2.0, Culture=neutral, PublicKeyToken=afb0a02973931d96' ``` However, this seems to happen only with the latest version on nuget. When using the older version `0.32.1` I don't get any such errors and can create compressed files just fine. I found this already closed issue when trying to find what the problem was: https://github.com/adamhathcock/sharpcompress/issues/591 so perhaps a similar issue has popped up again? I'm using dotnet 6.0.108 on Linux.
Author
Owner

@adamhathcock commented on GitHub (Sep 7, 2022):

A bit of mystery as 0.32.2 didn't change the csproj or references. Not sure what has been done stop the assembly to load.

https://github.com/adamhathcock/sharpcompress/compare/0.32.1...0.32.2

@adamhathcock commented on GitHub (Sep 7, 2022): A bit of mystery as 0.32.2 didn't change the csproj or references. Not sure what has been done stop the assembly to load. https://github.com/adamhathcock/sharpcompress/compare/0.32.1...0.32.2
Author
Owner

@Erior commented on GitHub (Sep 14, 2022):

To me it sounds like it does not replace the dll when you run the new project, check the dll in the directory with your application and your nuget cache.

@Erior commented on GitHub (Sep 14, 2022): To me it sounds like it does not replace the dll when you run the new project, check the dll in the directory with your application and your nuget cache.
Author
Owner

@hhyyrylainen commented on GitHub (Sep 15, 2022):

I just tested again and I guess this was a nuget cache issue or something like that. I did try all of the various command line flags to ignore caches but it didn't work before. I had issues with another library (which didn't turn out to be a nuget problem), which lead me to delete all of my package caches I could find, which likely made my attempt work now.

@hhyyrylainen commented on GitHub (Sep 15, 2022): I just tested again and I guess this was a nuget cache issue or something like that. I did try all of the various command line flags to ignore caches but it didn't work before. I had issues with another library (which didn't turn out to be a nuget problem), which lead me to delete all of my package caches I could find, which likely made my attempt work now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#534