Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old August 29th, 2008, 02:21 PM
Newbie
 
Join Date: Aug 2008
Posts: 5
Default 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.
Reply
  #2  
Old August 29th, 2008, 03:58 PM
Moderator
 
Join Date: Mar 2007
Location: North Bend Washington USA
Age: 68
Posts: 4,875
Default

These DLLs are in C++? Yes?
And you are trying yo use them in a C++ project iwth CLR support? Or a C# project?
Reply
  #3  
Old September 3rd, 2008, 04:56 PM
Newbie
 
Join Date: Aug 2008
Posts: 5
Default

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.
Reply
  #4  
Old September 3rd, 2008, 05:00 PM
Member
 
Join Date: Apr 2008
Posts: 67
Default

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?
Reply
  #5  
Old September 3rd, 2008, 05:04 PM
Needs Regular Fix
 
Join Date: Sep 2007
Location: The Netherlands
Posts: 428
Default

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
Reply
  #6  
Old September 3rd, 2008, 08:11 PM
Newbie
 
Join Date: Aug 2008
Posts: 5
Default

Quote:
Originally Posted by arnaudk
Then your question belongs in the .NET forum
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.)
Reply
  #7  
Old September 3rd, 2008, 09:40 PM
Moderator
 
Join Date: Mar 2007
Location: North Bend Washington USA
Age: 68
Posts: 4,875
Default

Let's try this in the .NET forum.
Reply
  #8  
Old September 3rd, 2008, 09:54 PM
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 6,095
Default

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?
Reply
  #9  
Old September 3rd, 2008, 09:56 PM
insertAlias's Avatar
Moderator
 
Join Date: Apr 2008
Location: San Antonio, TX (USA)
Age: 24
Posts: 1,930
Default

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?
Reply
  #10  
Old September 5th, 2008, 02:49 PM
Newbie
 
Join Date: Aug 2008
Posts: 5
Default

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.
Reply
  #11  
Old September 5th, 2008, 03:02 PM
Newbie
 
Join Date: Aug 2008
Posts: 5
Default

looks like I just figured it out. I wasn't specifying the full namespace.
Reply
  #12  
Old September 5th, 2008, 03:04 PM
insertAlias's Avatar
Moderator
 
Join Date: Apr 2008
Location: San Antonio, TX (USA)
Age: 24
Posts: 1,930
Default

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.
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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.
Post your question now . . .
It's fast and it's free

Popular Articles