enter image description hereI am trying to import a dll in my c# console project. I add the dll in the reference of the project. Right Click->add reference->browse. The DLL is placed in my project folder as well as in program data folder in c drive.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using mcp2210;
the last line "using mcp2210;" gives an error
Error 1 The type or namespace name 'mcp2210' could not be found (are you missing a using directive or an assembly reference?) C:\Users\testuser\AppData\Local\Temporary Projects\ConsoleApplication1\Program.cs
Do I need to use [DllImport("mcp2210.dll")] in my project? How can I access the functions of this dll?
edit
Hi I was able to add the dll in my project using the namespace from the object browser. However when I try to run it in debug mode I get badImageFormatException was handled popup.
Could not load file or assembly 'mcp2210_dll_m_dotnetv2_x86, Version=1.0.5980.19136, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format. Why is this happening?