NOTE: This main purpose of the question to UNDERSTAND/EXPLAIN the assembly binding behavior of the CLR. The solution should be evident once the reason is pinned down. Please, know that I understand my setup is not optimal (nativedll not signed and versioned etc) but again I just want to investigate [...] read more
I'm trying to extract the version number from a AssemblyInfo.cs file! And I'm trying to use System.Reflection.Assembly.LoadFile(path); But while doing this I get a BadImageFormatException; "The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)". So now I wounder, is that not a possible way to go [...] read more
I checked a lot of MEF questions here but I can't imagine what my problem is. Here's what's happening: I have a desktop WPF app that I'm deploying with AdvancedInstaller. I use .NET 4.0 and MEF to compose parts. Some parts are in the main project, so they are inside [...] read more
I'm generating a Greeter.dll using the Roslyn compiler. My problem occurs trying to load the DLL file. Here's the code: using System; using Roslyn.Compilers; using Roslyn.Compilers.CSharp; using System.IO; using System.Reflection; using System.Linq; namespace LoadingAClass { class Program { static void Main(string[] args) { var syntaxTree = SyntaxTree.ParseCompilationUnit(@" class Greeter { [...] read more
I have an almost empty ASP.NET MVC4 project referencing a 64 bit managed assembly, which has a set of unmanaged dependencies. The managed assembly is referenced the normal way through references. The unmanaged dependencies are copied to the bin folder on a post build event - and are present when [...] read more
We have a ASP.NET project in the company that runs for 5/6 developers. All Visual Studio 2017 and debug on IIS Express, no crazy setting or anything to make it run. 1 colleague cannot get it to work, he always gets the following exception: enter image description here [https://i.stack.imgur.com/MsOBz.png] We [...] read more
I have ActiveX VB6 DLL (have no access to its sources), and want to call method 'GetUnitInfo' I use to import it like: [DllImport(@"C:\Users\R\Documents\lab.dll")] public static extern long GetUnitInfo(String strRequest, String strInfo, String strName); But I get an exception: > Unable to find an entry point named 'GetUnitInfo' in DLL [...] read more
Creating a WCF Service Library in Visual Studio 2008 on Vista x64 is troublesome when referencing an x86 DLL. A service that calls a 32-bit DLL is required to have a platform target of x86 to run on a 64-bit OS. When you do this, the WcfSvcHost throws a BadImageFormatException [...] read more
I have Worker Services as Windows services which I am trying to install on a machine however it throws the below error when I try Installing it Microsoft (R) .NET Framework Installation utility Version 4.8.3752.0 Copyright (C) Microsoft Corporation. All rights reserved. Exception occurred while initializing the installation: System.BadImageFormatException: Could [...] read more
The exception is: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) I get it at the line: Assembly lvAssembly = Assembly.LoadFile(aPathFileName); The file being loaded is a plugin that is generated by a different application. If I changed the Target Framework Version of the plugin [...] read more
I have ocx created in VC++ If it is loaded statically it works fine but when I load it dynamically from assembly it gives exception . public Assembly assembly; public Form1() { InitializeComponent(); assembly = Assembly.LoadFile(Application.StartupPath + "\\abc.ocx"); } it gives following exception The module was expected to contain an [...] read more
I am trying to install the above but am getting the following errors when its attempting to install the setup support files, This is the first error that occurs during installation of the setup support files TITLE: Microsoft SQL Server 2008 R2 Setup ------------------------------ The following error has occurred: The [...] read more
These lines: "[Environment]::Is64BitProcess" "[Reflection.Assembly]::LoadFile("C:\MvxAPI\MvxSockx64.dll") " gives these results: True Exception calling "LoadFile" with "1" argument(s): "The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)" At C:\GitRepo\PowerShellScripts\ApiDllTest.ps1:11 char:1 + [Reflection.Assembly]::LoadFile("C:\MvxAPI\MvxSockx64.dll") + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : BadImageFormatException The DLL is supplied [...] read more
It seems I've somehow managed to corrupt my machine's .NET Core installation. I am unable to run any basic ASP.NET Core application. Instead the following error occurs: > System.BadImageFormatException occurred > > HResult=0x80131018 > > Message=Could not load file or assembly 'Microsoft.AspNetCore.Hosting, > Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The module > was [...] read more
I have a user with issues loading a .Net assembly into AutoCAD. I get the following error: > Cannot load assembly. Error details: System.BadImageFormatException: Could not > load file or assembly (hr = 0x80131018) They are using an anit virus package called Endpoint Security and when this is turned off, [...] read more
I'm fairly new to WiX and I have been trying to create an installer for some software my team has been working on. The installer worked well until the customer asked us to include some of their own .dll files in the installer, up to this point we had left [...] read more
I am getting this error when I try to run unit tests via teamcity MyTeamCity version is 9.1 and I am using Visual Studio 2015. If I change the name of MSTest.exe or vstest.console.exe it throws another error about finding the files. Also I think the problem is not about [...] read more
I have two computers that are both W7-64. I am attempting to prepare the second computer (PC) to execute an IronPython automation suite that was built on the first computer (Master). Currently, PC is failing when scripts reach the following line: clr.AddReferenceToFileAndPath(Path.GetFullPath(r"C:\analyst_test\bin\Debug\Win32API.dll")) Output: SystemError: The module was expected to contain [...] read more
I have a problem copying assembly files to GAC using msi installer file. My project requires me to add some .netmodule files along with a .dll file to GAC. But using the assembly = ".net" for .netmodule file in the <File> element is throwing an error(build error). Error 2 The [...] read more
I have an assembly loading problem that's cropping up when I convert from Vista (32bit) to Windows 7 (32bit). It occurs when I try to load some very old Sybase ASE ADO.NET data provider DLLS. The log from the fusion log viewer shows this: *** Assembly Binder Log Entry (18/01/2010 [...] read more
I'm running a .NET 2.0 executable with a .com extension from a command line and receiving the following error: System.BadImageFormatException : The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) I'm pretty sure it's trying to load a DLL from the .NET 2.0 Global Assembly Cache. [...] read more
I'm calling an unmanaged dll from my managed c# code and wanted to check I'm calling the right version. The code I'm trying to load the assembly (to then get the resource file and then get the version) is: cur_version = Assembly.LoadFile("X:\Workspace\yreceipts_pos\yRprintProcessor\Debug\yRprintProcessor.dll"); It's failing because of this error: The module [...] read more
I am trying to load XceedZip.dll in java using JNI4net/proxygen. when proxygen command is executed I am getting Could not load file or assembly 'file:///C:\Eclipse\JNITest\JNI\XceedZip.dll' or one of its dependencies. The module was expected to contain an assembly manifest. Please find below the binder log entry *** Assembly Binder Log [...] read more
I am working on an API integration with a web app. The API is written in Microsoft .Net Framework. I was able to get the API working through an C# application, but I would like to migrate this to python so I can use this within my web application. I [...] read more
I am trying to execute a Python Script on a C# Application. So I choose Iron Python, I have managed to execute basic code. But while using libraries like xml or json. I cannot import and use them. I've tried a lot,but nothing works out. The main thing which I [...] read more
These statements: [Environment]::Is64BitProcess [Reflection.Assembly]::LoadFile("C:\MvxAPI\MvxSockx64.dll") Generate: True Exception calling "LoadFile" with "1" argument(s): The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) At C:\GitRepo\PowerShellScripts\ApiDllTest.ps1:11 char:1 + [Reflection.Assembly]::LoadFile("C:\MvxAPI\MvxSockx64.dll") + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : BadImageFormatException From a PowerShell program I've written, I [...] read more
i am trying to call some third party c# dll's from C++ program. In stand alone c# program everything works fine without exception. When running C++/CLI I get an exception "BadImageFormatException in mscorlib.dll" Could not load file or assembly "MyTestAppCpp.exe" or one of its dependencies. The module was expected to [...] read more
We have what seems to be a assembly loading or probing difference driven by Kentico 10 (compared to 9 and earlier) that I'm trying to understand, so I can troubleshoot assembly load errors, my current example being the following... > Example: We've been using Expert PDF components in websites from [...] read more
I have a DLL written in C called amzi.dll, and a wrapper DLL written in Managed C++ called amzinet.dll. amzinet.dll calls amzi.dll. In my C# project I have added amzinet.dll as a reference and as per the requirement, copied the non-CLR DLL amzi.dll to the bin directory of my application. [...] read more
I have an asp.net mvc web application working fine before I upgraded nreco.pdfgenerator to version 1.1.10. After upgrading to version 1.1.10, whenever a pdf file is generated, the application stops working and just displays the message Server Error in '/' Application. Could not load file or assembly 'file:///C:\Projects\bin\msvcp120.dll' or one [...] read more
I installed Visual Studio 2012 Update 4 (downloaded from MS download center) and lost the connection to Team Foundation Server from Team Explorer. Before that, I was connected right at VS2012 startup. It is not the case anymore and I cannot connect to Team Foundation Server from any entry in [...] read more
I am developing ASP.NET web application (C#). When I rebuild my solution, the process very slow than before. And I got this error. The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) Description: An unhandled exception occurred during the execution of the current web request. Please [...] read more
I am a newbie for C#, although I have several years of experience with OOP. For a project in the design phase, I was chosen to find out how multilinguality can be done under C#. For the project, I am currently using Microsoft Visual Studio 2010 Express... What I have [...] read more
For the sake of learning, I'm trying to call an Assembly function from C#. I'm working in a very sterile project doing everything as simply as I can. Here's my assembly (mostly cut and paste from codeproject): .386 .model flat, stdcall option casemap :none include \masm32\include\masm32rt.inc .code LibMain proc instance:dword,reason:dword,unused:dword [...] read more
Running a test in Fitnesse gives: > Could not complete testing: fitnesse.slim.SlimError: Error SLiM server died > before Header Message could be read. When using Slim RunnerW.exe to debug my test I get an exception: > System.BadImageFormatException: Could not load file or assembly > 'file:///c:\path\assemby.exe' or one of its dependencies. [...] read more
I am new to .net, I was developing a payment API and it is working fine if I run this application from Visual Studio, but once published to IIS its not working. All the dll files are there in the bin folder. Can anyone help to resolve this? Please find [...] read more
Error Loading: c:\users\tigran\source\repos\voyagerbuild\processor\blocks\Redemption64.dll. Reason: System.BadImageFormatException: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) How can i create RdoSession with help interop.Redemption? There is this example set Session = CreateObject("Redemption.RDOSession") but i have not CreateObject method read more
I have an application that has all the DLL files it needs embedded into it so that it is a standalone exe. Here is how I am loading everything now: public static Assembly ExecutingAssembly = Assembly.GetExecutingAssembly(); public static string[] EmbeddedLibraries = ExecutingAssembly.GetManifestResourceNames().Where(x => x.EndsWith(".dll")).ToArray(); public static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs [...] read more
I have no problems to call C++ DLL functions from C# by using dynamic linking, but got problem when I tried to make it in dynamic way: Trying to get DLL handler: var DLL = Assembly.LoadFile(@"C:\project\mydll.dll"); And got exception: > An unhandled exception of type 'System.BadImageFormatException' occurred in > mscorlib.dll [...] read more
I have a problem with my project. My project had a target framework 4.5.1 and everything worked fine. I changed my project's target framework to 3.5 and got problems. Firstly I had to change some code (ex. Task replace with Thread, etc.) When there was no more errors I decided [...] read more
So from what I can gather online, to be able to save items to a TFS project, all you need to do is reference Microsoft.TeamFoundation.Client and Microsoft.TeamFoundation.WorkItemTracking.Client. So, I run my code and have those files copy to my bin (because you have to get them from the Visual Studio [...] read more
We are trying to use WebSupergoo's ABCpdf .NET v10. And it works great if we use their installer. But v8 is already installed on the server with other projects using it, so we do not want to run the installer at this time. (Hopefully in the near future we can [...] read more
This question seems weird but weird problems often require weird solutions. I'm having a problem with Windows Azure and SignalR. As I described here, the assembly System.EnterpriseServices.Wrapper.dll is not being found and my application is crashing from time to time. I cannot explicitely add a reference to System.EnterpriseServices.Wrapper.dll. Visual Studio [...] read more
I want to load a COM dll dynamically in c# console application. Till now I have tried the following code: // load exe with args as EXE DllName classNameTobeLoaded try { // load assembly Assembly Dll = Assembly.LoadFile(@"C:\My_Dir\TestComDll.dll"); // get the type names foreach(Type t in Dll.GetExportedTypes()) { dynamic vClassLoaded [...] read more
I have getting the following error message when I try to run the application. Could not load file or assembly 'bin\ABCpdf8-64.dll' or one of its dependencies. The module was expected to contain an assembly manifest. Please find below full details from FusionLog Viewer <meta http-equiv="Content-Type" content="charset=unicode-1-1-utf-8"><!-- saved from url=(0015)assemblybinder: --><html><pre> [...] read more
when i try to run an application i've created using VS2012 it gives me an "Error while trying to run project: Could not load file or assembly". And ive try to look on the vs log fuslogvw. This log report was given to me. I really dont know whats wrong [...] read more
After having installed visual studio 2012 on clear windows 7 machine i've issues running such applications as powershell,eventviewer and sql server setup. In FusionLogViewer there are logs for failed binding for assembly System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 for powershell with error code hr = 0x80131018. Does anyone know how to fix [...] read more
I have following code to start my server: private static IXSocketServerContainer server = null; public SocketServer() { server = XSockets.Plugin.Framework.Composable.GetExport<IXSocketServerContainer>(); } this worked fine for me under WinXP and Win7, with exactly the same set of dll and exe files, but now I deployed my system under WinServer 2008 and [...] read more
I can't seem to get past this error, so I'm wondering if I'm doing anything wrong in my call code, or my DLL? -Error- $exception {System.BadImageFormatException: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) -call code- Assembly assembly = Assembly.LoadFile(@"C:\Users\Admin\Documents\Visual Studio 2012\Projects\MyDLL\Release\myDLL.dll"); Type type = [...] read more
I got a C++.NET library from a colleague with a name like "my-name.dll". Importing in IronPython is not possible since "from my-name import *" is not valid. If I rename the library to "myname.dll" I get an error that the assembly manifest is missing (HRESULT: 0x80131018). Now I'm not sure [...] read more
I hava a WPF application which uses both C# and C++ dlls. On most machines it works properly but I have a few machine which when trying to run the application on them it I get the exception: The module should contain an assembly manifest. (HRESULT:0x80131018) I have no idea [...] read more
I have just come to revisit an old virtual sharepoint 2010 install. When I crank up central administration I get the following error: The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018) Line 379: <compilation batch="false" debug="false"> Line 380: <assemblies> Line 381: <add assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, [...] read more
Looks like I am struck with a simple issue. I am hosting a precompiled website. It compiles and works fine in my local box. But when I host in IIS it fails with following error. Could not load type 'MyHero.Home1'. <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Home.aspx.vb" Inherits="MyHero.Home1" %> I can find [...] read more
After upgrading to Specflow 2.3.2, feature.cs file generated following error message when changing feature file > Unhandled Exception: System.BadImageFormatException: The module was expected > to contain an assembly manifest. (Exception from HRESULT: 0x80131018) at > System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence) at > System.Reflection.Assembly.LoadFile(String path) at > TechTalk.SpecFlow.VisualStudio.CodeBehindGenerator.CommandLineHandling.PreLoadAssemblies() > at > TechTalk.SpecFlow.VisualStudio.CodeBehindGenerator.CommandLineHandling.PreLoadAssemblies() [...] read more
I am trying to utilize the "cards.dll" module to create a visual card game, and I can't seem to figure it out despite all of the Googling I can think to do. I have the DLL file (203,024 bytes) but I'm confused about the "registration" as a .NET or a [...] read more