I am trying to run an existing solution on my local machine but every time I try to run it I get the error below [image below].
Could not load file of assembly 'HtmlToPdfBuilder' or one of its dependencies. An attempt was made to load a program with an incorrect format'
I am unsure if it is relevant but it also gives information about partial binding
WRN: Partial binding information was supplied for an assembly
I can't find where the dll "HtmlToPdfBuilder" came from so I can't check if there is a different version. I have got my project set to compile against "Any CPU", but have tried setting it to x64 and x86 and I have also tried setting "Enable 32-bit Applications" to both true and False in IIS.
The dll was sitting in a folder outside the project and referenced, I have tried moving it into the project and referencing it (just incase).
The exact same project works on someone else's machine and we have tried comparing but can't see any differences in set up.
I am running Visual Studio 2012 and this is a VB.NET project.
Update
This is also running on a server
- I have tried matching my IIS and Website settings
- I have tried copying all the dlls from the server down to my local machine but still get the same error
- I have also copied all my local dlls up to the server and the site still runs fine there
- I have also matched the webconfigs and the only difference is that on the server entity framework is set as Version=4.3.1.0 and locally it is Version=6.0.0.0
Here's what I finally did to fix this:
I cannot explain why this works, as not got any problems with any other sites, but as it did I thought I'd share incase it helps anyone else.