VS Installer Project is not pulling in all system.io.compression

0

I have a solution written in C# on .Net 4.6.1. The 2 projects are Windows Service and VS Installer. The windows service project has many references with 2 of them being system.io.compression and system.io.compression.filesystem.

The project compiles without error; however, when I compile the VS installer project I'm getting a missing file error for system.io.compression. I refresh the dependencies but the reference still doesn't show up. Why doesn't the installer project pull in the reference from the windows service project while all the other resources are available?

I've tried removing and re-adding the reference to the windows service project

I've tried adding the file referenced in the windows service project to the File System > Application Folder and it compiles with no errors but when installed and running I get the following error

System.IO.FileLoadException: Could not load file or assembly 'System.IO.Compression, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'System.IO.Compression, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' ---> System.IO.FileLoadException: Could not load file or assembly 'System.IO.Compression, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'System.IO.Compression, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. at efaactagent.Archive.Zip(String sourceFile, String destinationFile) at efaactagent.Jobitem.LogManagement()

c#
.net
visual-studio
asked on Stack Overflow Jul 15, 2019 by John Butler

1 Answer

0

check your *.config in all projects Try to remove all bindings redirects and regenerate them again via PM> Get-Project –All | Add-BindingRedirect

answered on Stack Overflow Jul 15, 2019 by GDocal

User contributions licensed under CC BY-SA 3.0