Reputation: 4249
I included the bin folder in my MVC project (TestProj), and added my own dll file (testDll.dll). I am trying to access my dll file by writing:
using TestProj.testDll;
but it doesn't recognize my testDll file.
Upvotes: 0
Views: 2511
Reputation: 18743
To add your testDll.dll
file as a reference:
References
under your projectAdd reference
Browse
and look for your testDll.dll
fileThen, add the using XXX;
(where XXX
is a namespace present in your library) line in the files where you need to access your library members.
If you later want to update your library, just replace the testDll.dll
file by the more recent.
Upvotes: 2
Reputation: 4892
Does your dll appear in your bin folder in the solution explorer window? Btw, you can only import the namespaces but not your dll with the using statement.
Upvotes: 0
Reputation: 41882
You need to add a reference to your assembly DLL. Right-click your project's References
in Soluction Explorer, select Add Reference
, click the Browse
tab, then select your library.
Upvotes: 1
Reputation: 21878
using Blah;
Blah
is a namespace, not a DLL. It's just a convenience to save you the typing of the namespace when referencing the functions in the DLL.
What you want is to add the DLLs in the references of the project. Right-click References under your project (in the Project View) and choose Add Reference.
Upvotes: 1