I get a An attempt was made to load a program with an incorrect format error on a SQL Server replication project
I've found the solution. I've recently upgraded my machine to Windows 2008 Server 64-bit. The SqlServer.Replication namespace was written for 32-bit platforms. All I needed to do to get it running again was to set the Target Platform in the Project Build Properties to X86.
An attempt was made to load a program with an incorrect format. ChilkatDotNet4. Not fixed by usual methods
After changing your windows service to x86 this will change the build directory to
..ProjectName\bin\x86\debug
Make sure your windows service is pointing at this directory otherwise you will be running your old (any CPU) version of the service.
If you service is not pointing at this x86 directory, uninstall and reinstall the service for the new directory
Could not load file or assembly ... An attempt was made to load a program with an incorrect format (System.BadImageFormatException)
I am pretty sure you're having a 32-bit / 64-bit conflict. It sounds like your main project might be set to 32-bit while the class its referencing is set to 64-bit. Try looking at this SO question and this one too. Between the two of them, you should be able to figure out your problem.
UWP - SQLite - An attempt was made to load a program with an incorrect format
With the question suggestions by StackOverflow, I found my answer :
I had to allow 32-bit applications on my application pool in IIS. (I get a "An attempt was made to load a program with an incorrect format" error on a SQL Server replication project)
Related Topics
Filter/Search Using Multiple Fields - ASP.NET MVC
How to Get Values from Igrouping
What Represents a Double in SQL Server
Best Way to Call a JSON Webservice from a .Net Console
How to Specify Proxy Credentials in Your Web.Config
Correct Way Communicate Wsse Usernametoken for Soap Webservice
How to Find a Specific Element in a List<T>
What Is the Correct Performance Counter to Get CPU and Memory Usage of a Process
Determine If Uploaded File Is Image (Any Format) on MVC
Check If a String Contains an Element from a List (Of Strings)
Compare Equality Between Two Objects in Nunit
Why Do Local Variables Require Initialization, But Fields Do Not
Asp Net Web API 2.1 Get Client Ip Address
Simplest Way to Do a Fire and Forget Method in C# 4.0