Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Question regarding the DLL files

Question regarding the DLL files

Scheduled Pinned Locked Moved C#
csharpvisual-studioquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amitmohanty
    wrote on last edited by
    #1

    While creating C# Class Library (DLL) Using Visual Studio .NET, once we have created the dll file, then if we want to use the dll file in someother projoect then I have to add it as a reference by Project->Add reference. I was wondering if I have to do it everytime I create a new client program or just I have do it once and then in each client project/program I can call the namesapce by using mcMath; \\ Assuming that my dll is called mcMath

    D 1 Reply Last reply
    0
    • A amitmohanty

      While creating C# Class Library (DLL) Using Visual Studio .NET, once we have created the dll file, then if we want to use the dll file in someother projoect then I have to add it as a reference by Project->Add reference. I was wondering if I have to do it everytime I create a new client program or just I have do it once and then in each client project/program I can call the namesapce by using mcMath; \\ Assuming that my dll is called mcMath

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You would stil have to add the reference to each application that you wrote that uses this .DLL. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      A 1 Reply Last reply
      0
      • D Dave Kreskowiak

        You would stil have to add the reference to each application that you wrote that uses this .DLL. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        A Offline
        A Offline
        amitmohanty
        wrote on last edited by
        #3

        Can I create an installer which installs itself and I don't need to add it as a reference always? Regards and Thanks a lot, Amit

        D 1 Reply Last reply
        0
        • A amitmohanty

          Can I create an installer which installs itself and I don't need to add it as a reference always? Regards and Thanks a lot, Amit

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          There's no such thing. The only way to get this functionality is if you modify the project templates to include your reference in the default list of references for that project. There's no such thing as just typeing using ... and having the reference automatically made. The only reason you think you see this is because the namespace that your using is part of an existing reference. Try it, create a new C# application, but don't add anything to it. Look under References and you'll see that there is a default set already made. Look in the Object Browser and you'll find that every namespace under those references (the .DLL's) is available just by typing using ... at the top of your code. But this exists ONLY because the references have already been made. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups