System.BadImageFormatException occurred

System.BadImageFormatException occurred
  Message=Could not load file or assembly 'Interop.MakeCardp, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
  Source=<Cannot evaluate the exception source>
<Cannot evaluate the exception stack trace>

I've  VB.NET application  that uses a Vb6 activex in VS2010 without problems. I've moved that app to VS2017 (idem framework 3.5,  platform and target cpu x86) and now I get the error above.

any suggestions?
Who is Participating?
ste5anSenior DeveloperCommented:
Check your project settings. You're using a library with the wrong .NET version. Either you're building your migrated project in a newer version, or you load a library dynamically without checking its .NET version.
leorochaAuthor Commented:
Move from .NET 3.5 to 4.0 CLient Profile and works!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.