I have a DLL which can be used with no problems in a Visual C++ project. When I take the same DLL to be used in a Visual C# project, there are problems.
For the Visual C++ case, all I need to do is to place the dll in the same folder as the executable. For the Visual C# project, when I tried that, I get the error %1 is not a valid Win32 application.
Then I tried to add the dll as a reference in the Visual C# project but failed. The error received was The dll could not be added. Please make sure file is accessible and it is a valid assembly or COM component.
Is this because the same dll that works on Visual C++ cannot be used in Visual C# project without modification?
Thanks. I am using Visual studio 2012.