 | 
August 29th, 2008, 02:21 PM
| | Newbie | | Join Date: Aug 2008
Posts: 5
| | Re-using dll's
Please forgive me if this question has already been answered.
I have several dll's written and compiled for an existing program. These were written in Microsoft Visual C# 2008 Express Edition. I am beggining a new project and would like to re-use some of these dll's in the new project without having to write them all over again. I'm sure it can done but I have not been able to use the functionality in the dll's. I have added references to the dll's in the project explorer and even added them to the using clause. any help is appreciated.
| 
August 29th, 2008, 03:58 PM
| | Moderator | | Join Date: Mar 2007 Location: North Bend Washington USA Age: 68
Posts: 4,875
| |
These DLLs are in C++? Yes?
And you are trying yo use them in a C++ project iwth CLR support? Or a C# project?
| 
September 3rd, 2008, 04:56 PM
| | Newbie | | Join Date: Aug 2008
Posts: 5
| | Quote: |
Originally Posted by weaknessforcats These DLLs are in C++? Yes?
And you are trying yo use them in a C++ project iwth CLR support? Or a C# project? | the dll's are written in C#. I want to re-use them in other C# projects.
| 
September 3rd, 2008, 05:00 PM
| | Member | | Join Date: Apr 2008
Posts: 67
| | Quote: |
Originally Posted by draxton the dll's are written in C#. I want to re-use them in other C# projects. | When you say that you cannot use the functionality, do you mean that you get compilation errors, or that the classes from the DLL's does not appear in intellisense? Have you tried to re-compile your project after adding the reference?
| 
September 3rd, 2008, 05:04 PM
| | Needs Regular Fix | | Join Date: Sep 2007 Location: The Netherlands
Posts: 428
| | Quote: |
Originally Posted by draxton the dll's are written in C#. I want to re-use them in other C# projects. | Then your question belongs in the .NET forum | 
September 3rd, 2008, 08:11 PM
| | Newbie | | Join Date: Aug 2008
Posts: 5
| | Quote: |
Originally Posted by arnaudk | I apologize for not posting in the correct category.
When I add a reference to the dll, my project will not compile correctly. I do not have exact error in front of me. The dll resides in a seperate folder than my project. I have even copied the dill to the project folder and added a reference to the dll from the project folder.
The message that I get is that the namespace could not be found(you are missing a directive or an assembly reference.)
| 
September 3rd, 2008, 09:40 PM
| | Moderator | | Join Date: Mar 2007 Location: North Bend Washington USA Age: 68
Posts: 4,875
| |
Let's try this in the .NET forum.
| 
September 3rd, 2008, 09:54 PM
|  | Moderator | | Join Date: Apr 2007 Location: New England
Posts: 6,095
| |
When you have added the dll as a reference, when you right-click it and choose "view in object browser", do all the objects from the DLL show up in there?
| 
September 3rd, 2008, 09:56 PM
|  | Moderator | | Join Date: Apr 2008 Location: San Antonio, TX (USA) Age: 24
Posts: 1,930
| |
Well, you are going to need the exact error message, for one.
Also, try this. Start a new project, add the reference to one of the dlls and compile. Don't write any code, just build the project. Does it work? Also, do the dlls depend on each other?
| 
September 5th, 2008, 02:49 PM
| | Newbie | | Join Date: Aug 2008
Posts: 5
| |
I started a new project, added a reference to my dll. Checked the Object browser and see my objects under Class. the project compiled with no problem.
At this point in time I am only using one dll which, as a test, creates email parameters such as SMTP settings and client credentials.
| 
September 5th, 2008, 03:02 PM
| | Newbie | | Join Date: Aug 2008
Posts: 5
| |
looks like I just figured it out. I wasn't specifying the full namespace.
| 
September 5th, 2008, 03:04 PM
|  | Moderator | | Join Date: Apr 2008 Location: San Antonio, TX (USA) Age: 24
Posts: 1,930
| | Quote: |
Originally Posted by draxton looks like I just figured it out. I wasn't specifying the full namespace. | That's the direction I was heading in. Glad you figured it out.
|  |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over network members.
|