I have just faced this issue in VS 2013 .NET 4.5 with a MapInfo DLL. Turns out, the problem was that I changed the Platform for Build from x86 to Any CPU and that was enough to trigger this error. Changing it back to x86 did the trick. Might help someone.
More Related Contents:
- If async-await doesn’t create any additional threads, then how does it make applications responsive?
- Task vs Thread differences [duplicate]
- Maximum number of threads in a .NET app?
- Setting Objects to Null/Nothing after use in .NET
- Implementing IDisposable correctly
- Accessing UI (Main) Thread safely in WPF
- Multi-threaded splash screen in C#?
- Is there any benefit of using an Object Initializer?
- ‘using’ statement vs ‘try finally’
- Thread.Sleep for less than 1 millisecond
- Returning a value from thread?
- Is it OK to use a string as a lock object?
- STAThread and multithreading
- Monitor vs lock
- Proper way to Dispose of a BackGroundWorker
- EF Data Context – Async/Await & Multithreading
- Why am I getting this error:”Cross-thread operation not valid: Control lbFolders accessed from a thread other than the thread it was created on.”?
- Thread safe collections in .NET
- Properly locking a List in MultiThreaded Scenarios?
- Can you link to a good example of using BackgroundWorker without placing it on a form as a component?
- How is memory allocated for a static variable?
- Create multiple threads and wait for all of them to complete
- How to correctly read an Interlocked.Increment’ed int field?
- ConcurrentDictionary Pitfall – Are delegates factories from GetOrAdd and AddOrUpdate synchronized?
- Should thread-safe class have a memory barrier at the end of its constructor?
- Starting a new thread in a foreach loop
- Large Object Heap Compaction, when is it good?
- Multithreaded NamePipeServer in C#
- Wrapping ManualResetEvent as awaitable task
- Half – fences and full fences? [duplicate]