Re-using dll's

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • draxton
    New Member
    • Aug 2008
    • 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.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    These DLLs are in C++? Yes?
    And you are trying yo use them in a C++ project iwth CLR support? Or a C# project?

    Comment

    • draxton
      New Member
      • Aug 2008
      • 5

      #3
      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.

      Comment

      • pootle
        New Member
        • Apr 2008
        • 68

        #4
        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?

        Comment

        • arnaudk
          Contributor
          • Sep 2007
          • 425

          #5
          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

          Comment

          • draxton
            New Member
            • Aug 2008
            • 5

            #6
            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.)

            Comment

            • weaknessforcats
              Recognized Expert Expert
              • Mar 2007
              • 9214

              #7
              Let's try this in the .NET forum.

              Comment

              • Plater
                Recognized Expert Expert
                • Apr 2007
                • 7872

                #8
                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?

                Comment

                • Curtis Rutland
                  Recognized Expert Specialist
                  • Apr 2008
                  • 3264

                  #9
                  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?

                  Comment

                  • draxton
                    New Member
                    • Aug 2008
                    • 5

                    #10
                    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.

                    Comment

                    • draxton
                      New Member
                      • Aug 2008
                      • 5

                      #11
                      looks like I just figured it out. I wasn't specifying the full namespace.

                      Comment

                      • Curtis Rutland
                        Recognized Expert Specialist
                        • Apr 2008
                        • 3264

                        #12
                        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.

                        Comment

                        Working...