Reputation: 2368
i am adding a new folder to bin in solution explorer in vs 2010 and in that folder i am having one dll file and i want to access that dll file in the program in c#.net? i used using in code but i did not get the intelligence of that dll . please help me ?
Upvotes: 0
Views: 619
Reputation: 16
I am assuming you asking about web solutions. In web solutions bins doesn't have any sub folder. All the dlls reside just in the bin itself.
So drop the dll directly in bin...rebuild the full solution and you will get what you want.
Thanks
Upvotes: 0
Reputation: 3672
Try adding it as a reference.
In Solution Explorer, right-click the project node and click Add Reference.
In the Add Reference dialog box, browse to it.
How to: Add or Remove References in Visual Studio (MSDN)
Upvotes: 3
Reputation: 176159
Don't add files to the target bin folder of your solution as this folder is controlled by Visual Studio.
If the library is a .NET or COM library add it as a reference.
If the libary is a native dll do the following:
Then Visual Studio will make sure that the library gets copied to the target folder automatically where you can access it.
Upvotes: 0