I'm calling functions from a 32-bit unmanaged DLL on a 64-bit system. What I get is: > BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) At first, I had my projects set to the Any CPU platform, so I changed them [...] read more
I have a Windows service written in C# using Visual Studio 2010 and targeting the full .NET Framework 4. When I run from a Debug build the service runs as expected. However, when I run it from a Release build I get a System.BadImageFormatException (details below). I've been searching the [...] read more
I am getting this error while on of my .Net application are trying to make a connection to oracle database. The error says that This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.. But I have made sure many times that [...] read more
I seem to have hit on a scenario where when I run mstest on an AnyCPU assembly which references an x64 assembly, I get a BadImageFormatException. The issue occurs when an interface in x64Production.dll is implemented (even if unused) by the AnyCPUTestingx64Production.dll test assembly: Unable to load the test container [...] read more
Playing around with C# 7's Local Functions, I ended up with some interesting behavior. Consider the following program: public void Main() { Console.WriteLine("Entered Main"); DoSomething(""); } private void DoSomething(object obj) { Console.WriteLine("Entered DoSomething"); Generic((dynamic)obj); GenericLocal(obj); GenericLocal((dynamic)obj); // This breaks the program void GenericLocal<T>(T val) => Console.WriteLine("GenericLocal"); } private void Generic<T>(T [...] read more
I have a C# application which was written on a 32bit windows XP machine with Visual Studio 2005. The application runs fine on Windows XP machines, however when I try to run it on a 64bit Windows 7 professional machine, I get the following dialog-box on start up: enter image [...] read more
There are a lot of questions on this forum about the BadImageFormatException, but none quite matches my issue. I have a solution containing several projects. When I run in Debug or Release + Any CPU, everything works fine. When I switch to x64, however, and run my ASP.NET MVC project, [...] read more
EDIT Event log error was this: error 0x8007000B: The app manifest publisher name (CN=...) must match the subject name of the signing certificate (CN={19BE29DF-4812-4F2E-8FC1-A138B146946A}). The command below now seems to work. So either user error on my part that I cannot identify or something hinky with the state of machine [...] read more
I am getting following runtime error, with my console application(VS2012) which refers to "dcasdk.dll". .Net Framework of the console app is 4.5, platform target is "Any CPU". Could not load file or assembly 'dcasdk, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program [...] read more
I am trying to use 64-bit Sqlite on my Aspx project. When I run the project, I got the following error: > Could not load file or assembly ‘System.Data.Sqlite’ or one of its dependencies. An attempt was made to load a program with an incorrect format. I even set the [...] read more
I'm working on a .NET 3.5 console application in C# which uses a VC++ unmanaged DLL. It ran without a problem when I worked on it a few weeks ago, but I'm coming back to it today and am now getting a BadImageFormatException ("An attempt was made to load a [...] read more
I got a C++ dll which has to be integrated in a C# project. I think I found the correct way to do it, but calling the dll gives me this error: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) This [...] read more
.NET Core 3.1 added support for C++/CLI (Announcing .NET Core 3.1). The official announcement lists two new project templates, CLR Class Library (.NET Core) and CLR Empty Project (.NET Core), which we can indeed find and use. However, there is no additional information about supporting technologies such as WPF or [...] read more
I have this crazy issue where a SMO operation is failing, and the only difference is this odd file in my bin folder: > Could not load file or assembly 'Microsoft.SqlServer.BatchParserClien.dll NOTE: That is not a typo, that is the actual name of the file in the file system. I [...] read more
I'm working on a project and have run into an issue. When I run my code I get this error message: The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an exception The title of the message is "TypeInitializerException was unhandled". I receive this error at this line of code: this.crystalReportViewer = new [...] read more
I'm using EntityFramework version 6.1.3. I copied migrate.exe from EntityFramework version 6.1.3 package tool folder to bin folder of my website. My web site is compiled and published to production environment with x86 CPU and target framework 4.5.1 I run the following command: > D:\Sites\MatrixPortal\bin>migrate.exe d:\sites\MatrixPortal\bin\MatrixPortal.BL.dll /startUpDirectory="d:\Sites\MatrixPortal\bin" /startUpConfigurationFile="d:\Sites\MatrixPortal\Web.config" and i [...] read more
I'm trying to develop a simple WCF service running in a 64 bit environment. I fire up VS2010 under Windows 7 New Solution -> WCF project -> Run -> It works fine. As soon as I change the properties of the project in order to make it compile in 64 [...] read more
I am running windows vista business 64 bit. I have a web service that was written in .NET using C#. I also have a client-side script on a web page that communicates with the web service. This is a aspx page titled "Default.aspx". I setup IIS and moved my web [...] read more
I have installed the latest OpenCVSharp 2 (2.4.10.201...) with the NuGet manager in my project. Everything concerning OpenCVSharp.CvMat is working OK (loading, manipulation etc) so I am sure the installation is correct. However I cannot use OpenCVSharp.CPlusPlus at all! The problem is that it doesn't load OpenCvSharpExtern.dll. Error shown from [...] read more
I am trying to run Visbrain using Pythonnet in Microsoft Visual Studio 2017 Community in a window form, but i faced some problem below. Environment 1) Pythonnet version : v2.3.0 i downloaded this from "Manage Nuget-Package" in Visual Studio 2017 Community. 2) Python version : Python 3.6.5 (Amaconda 3) Already [...] read more
I'm working with National Instruments Measurement Studio in C#, and I've come across a bit of a problem in deploying my application to a particular computer (running Windows 7). I've tried asking on the National Instruments forums, but haven't got any solutions yet - could anyone here give me some [...] read more
I have created a dll in C++ using a Class Library project in Visual Studio. I need to call a method in the dll from a C# application. I got to know there are 2 approches. One is to add the dll project reference to C# project or use DllExport [...] read more
I'm having some issues running the Emgu on my server. It runs fine locally, but when I try to use it on the server with IIS, it doesnt work. Here is the error: System.TypeInitializationException: The type initializer for 'Emgu.CV.CvInvoke' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'cvextern': The [...] read more
TLDR I have a corrupt WIM archive that I'm trying to extract. I have tried using DISM, but it won't let me mount it because it doesn't recognize it as a WIM file. I have also tried editing it with a hex editor, but I don't know what I can [...] read more
I have this simple rust function. #[no_mangle] pub extern fn add_numbers(number1: i32, number2: i32) -> i32 { println!("Hello from rust!"); number1 + number2 } which is compiled to dll with [lib] name = "my_lib" crate-type = ["dylib"] I tried to use the dll from a C# console app (full framework), [...] read more
My program compiles nicely, but when I run the program I get this error: > "System.BadImageFormatException thrown calling IO_Init(). Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)" As far as I understand, this error is because my program tries to use a [...] read more
I created a machine learning model with keras using python. I saved this model in a .h5 file and want to use that file in my ASP.NET Core API. To load the model I am using Keras.NET. The problem I am encountering is that when I try to debug the [...] read more
I'm trying install IIS with Inno Setup, but I'm getting various errors. I tried command on DOS and works: > start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-ManagementService;IIS-CGI;IIS-RequestFiltering;IIS-ASPNET;IIS-HttpLogging;IIS-NetFxExtensibility;IIS-HttpErrors;IIS-DefaultDocument;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-StaticContent;IIS-ManagementConsole;IIS-DirectoryBrowsing;IIS-WindowsAuthentication;IIS-WebServer; I tried use this in Inno Setup: > Filename: pkgmgr; Parameters: "/iu:IIS-WebServerRole; IIS-WebServer: ; IIS-CommonHttpFeatures: ; IIS-ManagementService: ; IIS-CGI: ; IIS-RequestFiltering: ; IIS-ASPNET: ; IIS-HttpLogging: ; [...] read more
I have created a C++ DLL in Visual Studio 2017 using the following sources: Header: stdfax.h // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #pragma once #include "targetver.h" #define WIN32_LEAN_AND_MEAN // Exclude [...] read more
I have "WCF Service Application" which is .net framework 4.6.1. I need to add "Interop.zkemkeeper.dll" as a reference. but when I added this as reference to the WCF service and when service stated it shows following error on the browser. "Server Error in '/' Application. Could not load file or [...] read more
We recently purchased an EV Code Signing Certificate. I followed instructions and I can successfully sign our built applications (exe files), our libraries (dll). However, I can't sign our setup packages (MSI files), I always get this error: > SignTool Error: An unexpected internal error has occurred. Error information: "Error: [...] read more
I'm trying to connect to an Oracle database from a containerable dotnet core application, and haven't been able to find a solution that allows me to do this that fits all of these criteria: * Runs in .NET Core 2.0 * Doesn't require extra installation on the machine running it [...] read more
I would like to add to this issue. This was working previously when I was running our old DC Server running an older installation of Windows 2016 Server DC. Once we lost that DC, and then a hard drive failure took out the backup DC, along with the entire Web [...] read more
Former title Trying to boot from live usb stick but during startup but it says it cannot find E:/source/install.wim (error code 0x8007000B) Recently I've been trying to make a bootable live win 10 usb.I partitioned the disk into 2 segments, a 1.1 GB FAT32 and a 50~ GB NTFS segment, [...] read more
When you start Windows Photo Gallery (formerly Windows Live Photo Gallery, now part of Microsoft Essentials 2012), you may receive the following errors, and the application will close: Windows Live Photo Gallery encountered an error and can't start. Error Code: 0x80070043 read more
I have a .NetCore web API and and need to connect with a C++ shared library (libCppAppOutput.so). For this I am using DllImport inside the controller of the Web API as in the below code: [DllImport("libCppAppOutput.so", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi, EntryPoint = "methodNameinCppProject")] public static extern int MethodNameInWebAPI(string [...] read more
I have a T4 template that was working when my project was using .Net 4.6.2 with the following lines in my template. I am using Visual Studio 2019. <#@ template debug="false" hostspecific="true" language="C#" #> <#@ assembly name="System.Core" #> <#@ assembly name="$(SolutionDir)MyProject\bin\x64\Debug\MyProject.FooBar.dll" #> <#@ output extension=".cs" #> <#@ import namespace="System.Collections" #> [...] read more
I want to call a Fortran subroutine from C# using commands entered at the console. I have been trying for two days now, reading many web pages, and following much advice, but with no success. Here is a typical example of my many failed attempts. Using a text editor (Notepad) [...] read more
Using visual studio with class application I added the NLua via NuGet. I want to read in and .lua file (BTW, of there is a better way do let me know) My code is this: ... using NLua; ... using (Lua lua = new Lua())... But when I run it [...] read more
I have code written in ANSI C that I would like to use in C#. I have compiled the C code into a DLL and created C# wrapper classes to interop with the C code. The point of the wrapper is to simplify a users interaction with the underlying C [...] read more
I'm working on migrating from packages.config to PackageReference format for multiple csproj files. Restore and build succeeds but with hundreds of warnings. These warnings were not showing before my PackageReference changes to csproj files. Please let me know if you could guide on resolving these. warning NETSDK1049: Resolved file has [...] read more
I have a .Net 4.5 WPF MVVM application I have added scanning support using the TWAINDotNet. All of the scanning features work fine until I build in Release and deploy. I confirmed that everything is getting built using the same .Net and "Any CPU" for the processor. > 2020-04-03 16:06:33,169 [...] read more
I have to retrieve the device output data to create a stream with ManagedBass.Wasapi.dll, but an error is returned despite having copied the basswasapi.dll to the system32 folder and to the app's debug folder. MainPage.xaml.cs: private void BtnWasapi_Click(object sender, RoutedEventArgs e) { var device = BassWasapi.CurrentDevice; } I installed the [...] read more
Win32 C++ DLL project is saved in my bin/Debug file with the other DLLs. Running Debug x86 mode on my C# project. From previous attempts to solve this problem I have changed the Build Configuration to x86 from x64 but I still receive the same error. namespace ComputerToArduino { public [...] read more
I am trying to write the Following code in MSIL: class ReferenceTestViewModel : BaseViewModel, ITestViewModel { private int id; public int Id { get { return id; } set { this.SetProperty(ref id, value); } } } SetProperty being a method of its grand-father BaseObservable (BaseViewModel : BaseObservable). So I compiled [...] read more
I'm trying to use the FreeImage .NET wrapper in my project, my ptoject targets AnyCPU and the dll wrapper will not work under this, it will only works if I target x86 machine. When I try to load a file using the wrapper targeting AnyCPU or X64 it throws this [...] read more
Edit: I have uploaded the source code for the issue to GitHub if you would like to download: https://github.com/bryanenroute/assemblyloadcontext-issue I have a .NET Core 3.0 console application that references a .NET Standard 2.0 class library with a single interface (IModule). I also have a ASP.NET Core 3.0 application that references [...] read more
I am installing IIS using wix burn which works fine in my local. When I am trying to install in server it's getting failed to install, and the error is an attempt was made to load a program with an incorrect format. <!--Check For IIS Existance--> <util:RegistrySearch Id="IISWebServerRole64" Root="HKLM" Key="SOFTWARE\Microsoft\InetStp\Components" [...] read more
I have a web application which is hosted in Azure. When I run the app and authenticate the user, I am getting the error "One of the dependent DLL not found". Background: In the web application, I am using fingerprint scanner functionality to capture a fingerprint image. To capture fingerprint [...] read more
I have a Xamarin app for which I have been debugging the UWP app on my computer for testing. I've been having difficulties debugging. I keep getting a 'No Symbols Loaded' error which goes onto say one of the following errors: > UWPHost.pdb not loaded or > wkernelbase.pdb not loaded [...] read more
I am trying to automate some data collection using an Oscilloscope. I have a USB scope with plenty of examples. The examples worked just fine, but when I tried to create my own project things stopped working. I have mirrored their setup with respect to the .dll location and which [...] read more
For performance reasons, I am trying to write an IL delegate that can return a random KeyValuePair from a dictionary without having to use enumeration. To do this, I am directly reading from the dictionary's _bucket and _entries fields. Dictionary is a generic collection, but I would like to avoid [...] read more
Using .NET Core 2.1 and Microsoft.CodeAnalysis.CSharp.Scripting 2.10.0 to dynamically compile to assembly and keep it in-memory. Then trying to load this assembly via AssemblyLoadContext getting > Bad IL format How to correctly load fully in-memory assembly? What is the reason of this exception? I am missing to specify some metadata [...] read more
Hi I have looked at other answers and I don't see anything that would answer this, I have code that executes correctly when initiated by a unit test but throws > An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) When the same [...] read more
I'd reinstalled Windows on my PC, after that flashdevelop started to throw errors while building. Application starts for a few seconds, but then closes. output: Error details: net.sf.jni4net.jni.JNIException: Can't initialize jni4net. (32bit vs 64bit JVM vs CLR ?) CLR architecture: 64bit JAVA_HOME: C:\Program Files (x86)\Java\jre6 ---> System.BadImageFormatException: . (Exception from [...] read more
I setup IIS. I moved my folder with all the files to the IIS directory. Now when I go to http://localhost/thefolderI get: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) Description: An unhandled exception occurred during the execution of the current web [...] read more
I posted this on SE and was pointed here. I also told to give more information however this is literally all I have. - Every now and then a random error message appears on my computer stating: "An attempt was made to load a program with an incorrect format. (Exception [...] read more
The Project is running on asp.netcore 3.1.0. I encountered the exception System.BadImageFormatException at ServiceStack.ServiceStackHost. I just can't get AutoQuery working. the stack trace is below System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B) at ServiceStack.ServiceStackHost.OnStartupException(Exception ex) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\ServiceStackHost.cs:line 673 at ServiceStack.ServiceStackHost.RunPostInitPlugin(Object instance) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\ServiceStackHost.cs:line [...] read more
I created a C++ DLL and a C# project. (The C# project calls the C++ DLL functions). The DLL has the following header and cpp file: // Header.h #ifdef HEADER_EXPORTS #define HEADER_API __declspec(dllexport) #else #define HEADER_API __declspec(dllimport) #endif #pragma once #include <stdio.h> #include <stdlib.h> extern "C" HEADER_API bool function(...); // [...] read more
I try to load the custom library in my app, and I get a Bad IL Format error. Here is my code: var architectureFolder = (IntPtr.Size == 8) ? "64 bit" : "32 bit"; var wkHtmlToPdfPath = Path.Combine(_hostingEnvironment.ContentRootPath, $"wkhtmltox\\v0.12.4\\{architectureFolder}\\libwkhtmltox.dll"); AssemblyLoadContext context = new AssemblyLoadContext(GetType().Assembly.GetName().Name); context.LoadFromAssemblyPath(wkHtmlToPdfPath); Error details: > System.BadImageFormatException HResult=0x8007000B [...] read more
I have a WebService project using .Net Framework 2.0. I'm migrating to .Net Framework 4.7.2. Current source code is declaring WebMethod as below: import System.EnterpriseServices ... <WebMethod(TransactionOption:=TransactionOption.RequiresNew)> Public Function LoginUpdate(ByVal Lv_UserId As String) As String When it's execute SQL query, i receive an error: An attempt was made to load [...] read more
I have dll working with 86bit applications , so when i build my application to anycpu it is crushing i need my target to be any cpu because it solved me some other issues , so the deadlock is that i need is .dll not crushing in target: AnyCpu.(consider that [...] read more
I need to poll an Oracle database in BizTalk. In the postPollStatement I need to add the package that has been created for me in the Oracle DB. Can anyone assist me with this? I have created the schema in Visual Studio, the port is created and I have configured [...] read more
I am using a .NET Core 3.1. When I run the project locally, it works fine when I publish it to my Windows Server (windows server 2016) I am getting the following errors:enter image description here [https://i.stack.imgur.com/PkfoZ.png] Here is my error log file: info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to [...] read more
I have a device that records live data like eeg measurements. I want to send these data with a lab streaming layer (lsl). Unfortunately I'm unable to configure the lsl and get it to run. I'm not sure if I even copied the dll to the right places. What I [...] read more
I have the vs_community__1463967417.1589547493.exe when I run it, I see it extracting and requests me to give admin permissions, I allow, and nothing happens but it just creates files in the Temp folder. Contents of the Temp folder: VSFaultInfo dd_bootstrapper_20200818220314.txt dd_vs_community__1463967417.1589547493_decompression_log.txt The VSFaultInfo is a folder by the way. Content [...] read more
I'm attempting to include a C++ lib/dll into a C# project using a CLI wrapper, but After I added to the C# project references I started to get the following: System.BadImageFormatException occurred HResult=0x8007000B Message=Could not load file or assembly 'Wrapper, Version=1.0.7558.26276, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt [...] read more
I have a newly created (empty) .net core 3.1 WinForm project where I want to use CefSharp. The app in itself runs fine, but I cannot create an app package. I can create an app package if I do not add the CefSharp NuGet package, which makes me think there [...] read more
I hope you are doing alright :) So, I was doing some wix tutorials about Burn, Bootstrapper tool. I tried to build my own UI (following this tutorial) and when I wanted to run it, it crashed. I have included this to my AsseblyInfo.cs [assembly: BootstrapperApplication( typeof(CustomBootstrapperApplication))] This is my [...] read more
I have 2 application 1. UWP App 2. Winform Desktop App I want to create single Click Once Installer for both application So I have added Windows Application Packaging Project. and Added referance of both application .exe file both are added. now i am going to create app Package and [...] read more
Published neoj using visual studio 2017 and got neoj.exe file under bin\Release\PublishOutput but while running the neoj.exe file it throws: > Unhandled Exception: System.BadImageFormatException An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) and window show as dotnet has stopped working. Anyone plz [...] read more
I really need your help with OpenSSL! I have this code: echo "Generating license key.." echo "First sign the license" openssl dgst -sha256 - passin pass: "$RSA_ENCRYPT_PASSPHRASE" - sign "$PRIVATE_KEY" -out "$SIGNATURE" "$LICENSE_CONTENT" echo "Now, create a license package: license content + signature" tar - cvf "$LICENSE_PACKAGE" "$LICENSE_CONTENT" "$SIGNATURE" echo [...] read more
I have been following this MSDN example and when I try to compile it, it throws this exception: An attempt was made to load a program with an incorrect format. (0x8007000B) everything seems to work fine until it reaches xmlDoc.Load("test.xml"); part. I searched around for a while and can't find [...] read more
I have an app composed of three projects: * UWP app * .NET Framework 4.7.2 console app (Full thrust App service) * Packaging They build just fine in VisualStudio in debug and release. When building using MsBuild 2019 v16.4.2 or publishing with Visual Studio, the two first projects build fine [...] read more
I'm trying to install a library that calls a separate dll, so I have 2 dll files. Lets call them library.dll and dependency.dll respectively. If both are 32 bit I get the following error: Unable to load DLL 'dependency.dll': The specified module could not be found. If they are both [...] read more
As mentioned in Hybridizer's documentation, you can't use the new x() method of instantiating an object in Hybridizer CUDA code. I tried to use this method, but it would give an error related to the use of typeof(x) [ERROR] : 0X6079 : EnrichMethodDependencyGraph failed for method System.Type -- Exception: System.NullReferenceException: [...] read more
The build warning is: System.BadImageFormatException: Could not load file or assembly, File '...' or one of its dependencies. An attempt was made to load a program with an incorrect format. I have rebuilt everything as x86 and checked all dependencies are 32bit. When I build, rtcli.exe is the only process [...] read more
I have created dll of LibreDWG using msys2 and swing, but I cannot import it to C# code. Firstly, I compiled libreDwg using msys2: $ ./configure --disable-python $ make Then I applied swig to it and create dll using provided interface: $ swig -csharp dwg.i $ gcc -c -fpic *.c [...] read more
I am getting error while running the program at VS2017 [C#]. While I am running at my local system it is running fine. No error I am getting. But when I am build the solution and put the solution at the Prod server I am getting error. My mainlogin page [...] read more
Our application is C# .Net 4 and calls an unmanaged 32bit DLL. It's been working fine and runs many machines (mostly 64bit Windows 7). However, I recently encountered one particular user on whose machine the program traps with BadImageFormatException as soon as the call into the unmanaged DLL is made. [...] read more
Geting below error while calling service Message authentication failed. Service: https://dashboard-dev.onsolve.com/DashboardSTS/Service.svc/IWSTrust13/Action: http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/IssueClientIdentity: ActivityId: SecurityTokenException: Unknown internal error. ---> DllNotFoundException: Unable to load DLL 'libargon2.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) If I manually add it in bin folder,tried both x86/64 .I am getting below error [...] read more
I have a .NET 4.6 web app running in an Azure App Service in 64 bit. When I hit a controller that calls LibGit2Sharp, I get the following exception: [BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)] And this is the [...] read more
I'm around trying to create an interoperable dll written in C # for use in Microsoft NAV 2016, for the development of a fiscal printer driver. In my C # project I called to other functions dll (delivered by the company Bematech, in 32-bit and unmanaged). Calls to the functions [...] read more
I want import an external C++ DLL in my C# code. But my following code doesn't work... I build my C# with "Any CPU" and my C++ DLL is built in 32 bits. Here my C++ DLL function: extern "C" DWORD __stdcall ScanForIed(LPSTR lpstrHtmlIedTag, LPSTR lpStartIpAddress, DWORD iNbAddressesToScan, LPSTR lpSelectedAddress) [...] read more
I am using C# .Net framework 4.5 XAML application. My XAML application calls a DLL that I then use to make a call to the Total Phasae I2C aardvark_net.dll, which I have a reference in my C# DLL to it. The aardvark_net.dll depends on the aardvark.dll being in the same [...] read more
A user uploaded a PNG file which looks as if it is corrupted in some way. But the biggest problem is that any time our system tries to thumbnail it the entire app pool crashes and restarts. I've tried it using a direct URL and using code inside a try [...] read more
I installed Wfapi SDK. All standard examples for Wfapi in VB and C work just fine but I wanted to wrap the dll to use it in C#. However the example from the official site VSSDKNET Wrapper converted into VS10 standard and compiled gives me the incorrect format HResult : [...] read more
Goal: generate method like this in runtime: public void InsertOnSubmit<T>(IQueryable<T> q, T o) where T : class, new() { (q as Table<T>).InsertOnSubmit(o); } My current code for this is: var tb = mb.DefineType("DatabaseDataRepository"); // define & implement other methods, etc /* Define InsertOnSubmit<> method */ var insertOnSubmitMethod = tb.DefineMethod("InsertOnSubmit", MethodAttributes.Public [...] read more
I am developing an add-in for outlook that references other libraries. It is supposed to work in Office 2013 and 2016 but in 2013 it does not work. Showing the errors the only thing I found is this: LOG: This bind starts in default load context. LOG: Using application configuration [...] read more
I've got issue with Microsoft Dynamics NAV instance. We're restarting Windows server each night (I know that we probably shouldn't do it, but this is a separated topic and not the point of this question). After windows server starts, SQL and Dynamics Nav instances are starting. Sometimes (1-2 times per [...] read more
Update I have now run through the tutorial 3 times with the same results (Visual Studio/Windows is unable to recognise the DLL as a valid file). This must be an issue with my environment, as mike below ran through the tutorial and it worked fine. I did notice this in [...] read more
I can't understand why this project don't start. It's logs don't give me normal explanation. I use asp core and have project version 1.0.1. I install .NET Core 1.1 Runtime & Hosting Bundle server because this latest version. I'm not be able to update project. Logg : info: Microsoft.Extensions.DependencyInjection.DataProtectionServices[0] User [...] read more
I found an example of UWP visualizer in this link but after I choose the audio file from the FilePicker and the Bass should start it returns an error: Attempt to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B), when Bass should start. public async Task Play() [...] read more
We exported .exe and followed process as defined here https://electronjs.org/docs/tutorial/windows-store-guide, after that I configured and used electron-windows-store to export .appx and sign that. We have purchased code signing certificate form Godaddy. I exported pfx s defined here https://au.godaddy.com/help/windows-install-codedriver-signing-certificate-and-create-pfx-file-2698?locale=en . Check my request for exporting appx signing that below. > > [...] read more
I have a ASP.NET 3.5 application that includes a 32-bit DLL. It works fine (and has for years) on Windows XP, 7 and 10. I am adding support for Windows 2012, 2012 R2 and 2016. It works on 2016, but does not work on 2012 R2. At the first call [...] read more
this topic certainly doesn't look 'new' but after reading a number of posts, blogs and comments, I'm still none the wiser, and can't get my test application working. From an implementation point of view I must compile the dll with mingW (when other MSVC compilers are used, the error count [...] read more
I am trying to do a basic C++ DLL in order to use it in C#.. the following classes are used: My cpp file #include "stdafx.h" #include "MathFuncsAssembly.h" namespace MathFuncs { double MyMathFuncs::Add(double a, double b) { return a + b; } double MyMathFuncs::Subtract(double a, double b) { return a [...] read more
error 0x8007000B: The app manifest publisher name (CN=563776A1-7D2D-4E8E-AFE2-XXXXXX) must match the subject name of the signing certificate (CN=anton). I have searched all over the web and I get answer such as "you have to make sure that the Publisher name (in the AppxManifest.xml file) is the same as the certificate's [...] read more
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) In Emgu.CV.Invoke....I am getting above error. My projects are configured with "Any CPU". I installed latest version of EMGUCV in nuget.... img = new Image<Bgr, byte>(bitmapImage); read more
I have a 3rd party DLL that I need to use in a c# application (.net 4.6.1). This is a 64 bit DLL, but I have a 32 bit version as well. The DLL is used successfully in vba (excel 64 bit) as follows: Declaration: Private Declare PtrSafe Function TheFunction [...] read more
I am trying to connect to an Oracle DB using the following method: OracleConnection con = new OracleConnection(); con.ConnectionString = "User ID=ID;Password=PASSWORD;Data Source=SOURCE"; con.Open(); write("connected to oracle " + con.ServerVersion); But every time I run the program I get the error: > [2018-11-01 09:29:19.705] System.BadImageFormatException: Could not load file or [...] read more
I strictly follow this sample: https://odetocode.com/blogs/scott/archive/2018/02/14/pdf-generation-in-azure-functions-v2.aspx I download the three files from the DinkToPdf repository Problem is when I add either 32bit OR 64bit DLLs, I get the following error: > One or more errors occurred. (An attempt was made to load a program with an incorrect format. (Exception from [...] read more
I'm trying to create a very simple webshop in Razor with SQLite. Unfortunately, when i trying to create the database (or creating the SQLiteConnection object) it throws a strange System.BadImageFormatException. > An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"} System.BadImageFormatException My code [...] read more
I am getting following error when running the application. System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op) System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op) at [...] read more
I am facing this issue while DLL Importing a 32 bit C++ DLL in Windows Service which is also 32 bit. I have even tried using LoadLibrary method and the issue remains same. The same source code and dll are working perfectly fine on 64 bit systems! Can anyone please [...] read more
I have .Net Core console app that connects to Azure SQL database using entity framework. Every think works fine locally but when I created publish package using this command line > dotnet publish -c Release -r win-x64 --self-contained false Zipped it and upload it and used it in Azure webjob [...] read more