?
Solved

c#: What is teh right way to adda new .dll as reference ?

Posted on 2008-06-26
3
Medium Priority
?
242 Views
Last Modified: 2013-12-16
Hi,

I'm working on this CMS (a website) in C# that has several .dll files in the Bin directory.

I've coded a .dll myself, but although I get no errors, it's not working. I suppose it might be because I'm not adding my .dll as a new reference in the proper way.

What I did is to compile it as a new project, copy the resulting .dll to the site's Bin directory and then in VS 2008 right-click on the root directory of the site and chose "Add Reference...".
In the dialog box, it's not in ".NET", "COM" or "Projects". So, I chose "Browse", point to the site's "Bin" directory and select it.

So, my question is: is this the right way to do it ? Something is missing ?
I had another previous version, that i simply deleted. I found no option in VS 2008 to remove the reference whatsoever.

Is this an issue ?

On another note, the "Build solution", only gives me the .dll in the debug directory, I got no "Bin" directory with the .dll
How do I do this ?

Any help would be appreciated.

Warm Regards,
Mário Gamito
0
Comment
Question by:angelsofgrace2006
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
Babycorn-Starfish earned 1500 total points
ID: 21873932
Hi,
 
after you've added the dll to your project, can you browse the dll? Go to View->Object Browser or View->Other Windows->Object Browser this should provide a tree view of all namspaces you have in your project, the one you have added should be listed if it has been successfully added.
0
 

Author Comment

by:angelsofgrace2006
ID: 21874092
Hi,

No, I haven't it there.
So, how to add it as a reference in the right way ?

Warm Regards,
Mário Gamito
0
 
LVL 11

Expert Comment

by:Babycorn-Starfish
ID: 21877765
Okay,

I do it like this (assuming its a .Net dll, although there's no real difference just different tabs)

1) Right mouse click on References in the Solution Explorer pane in Visual Studio, you'll see a context menu appear with the options Add Reference.... and Add Web Reference.... choose the first option

2) A form will be displayed with tabs .Net, COM, Projects, Browse, Recent, click on the Browse tab

3) The form will shift to the Browse tab and from here you can navigate to where the dll is that you want to add using the familiar 'explorer' interface, find your dll then click okay.

4) The form will close and you'll be back to your IDE, if it's not already expanded click on the + symbol next to references and you'll see a list of all of the references in your solution, System, System.Data etc, you should see the dll that you added.

5) Thats it really, if you're referencing code within the dll then you'll need to add the usual using statements to the top of your code.

Any more probs post back here, good luck
0

Featured Post

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question