I have created an application (compiled any cpu) that use a lib also compiled as any cpu (the library reference interop.CDO), and i have this error message:
Could not load file or assembly ‘Interop.CDO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies.Attempt was made to load the program with an incorrect format.
The problem is related with 64/32 compatibility. any solution for this problem ?
Thanks for help.
I think that CDO was deprecated in the previous century. There certainly will never be a 64-bit version of it. There’s little point, .NET has good SMTP support.
Use Project + Properties, Build tab, Platform target = x86 on your EXE project if you have to. If this is ASP then you’ll have to run your web app in a 32-bit application pool.