System.BadImageFormatException occurred

System.BadImageFormatException occurred
  HResult=0x8013101B
  Message=Could not load file or assembly 'Interop.MakeCardp, Version=8.0.0.0, 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>
  StackTrace:
<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?
leorochaAsked:
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.
0
 
leorochaAuthor Commented:
Move from .NET 3.5 to 4.0 CLient Profile and works!
0
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.