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

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()

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

Related

.NET Core and Azure Functions - build error System.Runtime 4.2.0.0

I'm creating Azure Functions for .NET Core, following the documentations on Microsoft and Github
So the key for using all functionality, and the publish functions from VisualStudio is package microsoft.net.sdk.functions.
However, after adding this nuget, I get the following build error
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified
File name: 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Reflection.RuntimeA...
[...]
file:///C:/Users/Stefan/.nuget/packages/microsoft.net.sdk.functions/1.0.7/tools/net46/
[...]
Although the package comes with .netstandard 2.0 support, it references the net46 folder and ends up in that error...
Any ideas how to solve this?

'Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

I am a newbie and just created a new project of type: ASP.NET Core Web Application (.NET Core) and let VS preload all the defaults. I changed nothing, except set index.cshtml the startup. It built ok, but has a run-time error of:
System.IO.FileNotFoundException occurred
HResult=0x80070002
Message=Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Call Stack (last item):
ntdll.dll!NtWaitForSingleObject() Unknown
What is happening here, and how can it be fixed?
Using Visual Studio Installer, selecting the Repair option solved the problem.

mod-mono-server4 assembly System.IO.FileNotFoundException

I serached but I didn't found how to resolve this problem. I have ASP.NET application with System.Web.DataVisualization.dll. Dll is in bin folder, simple ASP.NET apps are working but when I try to run this application I got error:
System.IO.FileNotFoundException Could not load file or assembly
'System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35' or one of its dependencies
also I have MONO_PATH=/usr/lib/mono/gac:/app_dir/bin

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=2.5.0.0

On Azure I am getting the following error
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.WindowsAzure.ServiceRuntime, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at redacted.Encryption.EncryptionManager.get_storageConectionString()
at redacted..ctor() in<>:line 49
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].
The answer was that I updated to azure tools 2.7 and was referencing the 2.5 dll version.
1) Delete the reference to the 2.5 dll in your project (or .csproj file if necessary) and add the reference to the 2.7 System.WindowsAzure.ServiceRuntime dll.
2)Redeploy.
3)Profit.

Could not load file or assembly 'AxInterop.DHTMLEDLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a258947a2b308f2f'

I am trying to use the DHTMLEDITOR with my C# Application with windows 7(its working fine with Windows XP),When I try to add an item or editing the existing item i am receiving the below mentioned error with the DLL AxInterop.DHTMLEDLib,
System.IO.FileLoadException: Could not load file or assembly
'AxInterop.DHTMLEDLib, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=a258947a2b308f2f' or one of its dependencies.
The located assembly's manifest definition does not match the
assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'AxInterop.DHTMLEDLib, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=a258947a2b308f2f'
Had same issue. Was solved with DHTML Editing Control for Applications Redistributable Package (x86)
http://www.microsoft.com/en-us/download/details.aspx?id=8956

Categories

Resources