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. Where are the libraries located in C#?

Where are the libraries located in C#?

Scheduled Pinned Locked Moved C#
csharptutorialquestion
27 Posts 5 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.
  • OriginalGriffO OriginalGriff

    They are kept ... exactly where you put them! :laugh: When you create a solution, it creates a folder for it, and sub folders for each project in that solution - the source code is stored there, and the binaries in yet more subfolders. The easiest way to find out exactly where a referenced library is is to open the "References" tab of your new project, and right click the reference. Select "Properties" and you will see the location under "Path".

    Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

    B Offline
    B Offline
    Brian_TheLion
    wrote on last edited by
    #4

    Thanks Griff for your reply. I tried right clicking on Engine3 in the At the moment Engine.dll is stored at Documents\Visual Studio 2015\Projects\SuperAdventure3\Engine3 But if I create a new project called such as Test010119 then I want to copy the Engine3.dll over to my new project so I can reuse some of the classes in Engine3. I don't know where to move Engine3.dll so it's recognized by the new program. Brian

    OriginalGriffO 2 Replies Last reply
    0
    • L Lost User

      The standard libraries that are part of .NET are already on your system. Most of them will be in the GAC. If you want to distribute your assembly, then I'd suggest CodeProject if you can take the time to write an article on what the thing does, and how/why it was built. If you don't feel like writing an article and just want to share the code, I'd recommend GitHub.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

      B Offline
      B Offline
      Brian_TheLion
      wrote on last edited by
      #5

      Hi Eddy. I just want to use some of the classes within Engine3.dll in a new project. So I need to copy Engine.dll from my old project over to my new project but don't know where the destination is to put Engine3.dll Brian

      L 1 Reply Last reply
      0
      • B Brian_TheLion

        Thanks Griff for your reply. I tried right clicking on Engine3 in the At the moment Engine.dll is stored at Documents\Visual Studio 2015\Projects\SuperAdventure3\Engine3 But if I create a new project called such as Test010119 then I want to copy the Engine3.dll over to my new project so I can reuse some of the classes in Engine3. I don't know where to move Engine3.dll so it's recognized by the new program. Brian

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #6

        I don't tend to move them, instead I add a reference to the project, so I get the "latest version" if it gets updated (and a copy of the DLL will get added to your debug or release folders) or I add the project as an "Existing Project" to the solution which lets me update the DLL project from both solutions (that one takes a little discipline in order to not break other apps!) My Utilities are never constant - I add methods and classes to them all the time, and this way I get the "Latest version" to work with regardless of the project I am working on. The other solution is to install your DLL in the GAC but that means strong names and so forth: How to: Install an assembly into the global assembly cache | Microsoft Docs[^]

        Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        B 1 Reply Last reply
        0
        • B Brian_TheLion

          Thanks Griff for your reply. I tried right clicking on Engine3 in the At the moment Engine.dll is stored at Documents\Visual Studio 2015\Projects\SuperAdventure3\Engine3 But if I create a new project called such as Test010119 then I want to copy the Engine3.dll over to my new project so I can reuse some of the classes in Engine3. I don't know where to move Engine3.dll so it's recognized by the new program. Brian

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #7

          BTW Brian, you do realize you can have a better username than "Member 14154627" if you want? It's easy to do, just hover over your username at the top right and select "Settings" - change "Your Display Name" to one that is free ("Brian" is taken, but "Brian The Great" isn't for example - though that last may be a little presumptuous :laugh: ). Click "Save My Settings" and you have a new display name

          Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          B 2 Replies Last reply
          0
          • B Brian_TheLion

            Using a step by step guild I created a "Engine" project in the solutions explorer and added classes to this "Engine project. In the main code I was able to refer to the "Engine" project by using "include Engine;. I noticed that when compiled C# had created a Engine.dll that contained all the classes. I was wondering where the library of dll's are kept so I could add this engine.dll to the library to use in the future for some other code. I'm pleased that you can create a lot of libraries to handle varibles and procedures which makes coding the main program much easier as you can use code such as '_player.CurtrentLocation.Description' and '_player.CurrentHitPoint' to refer to parts of the program within the DLL. Also there is no need for extra variables within the brackets, so this is possibles 'DisplayCurrentLocation()' making the code more tidier. Brian

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #8

            Hi, when you want to reuse a library (a managed code DLL file), you must “add a reference” and Visual Studio will include the DLL in your new project and copy it to the approapriate location. Copying the file yourself would not be sufficient. :)

            Luc Pattyn [My Articles] Nil Volentibus Arduum

            B 1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              BTW Brian, you do realize you can have a better username than "Member 14154627" if you want? It's easy to do, just hover over your username at the top right and select "Settings" - change "Your Display Name" to one that is free ("Brian" is taken, but "Brian The Great" isn't for example - though that last may be a little presumptuous :laugh: ). Click "Save My Settings" and you have a new display name

              Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

              B Offline
              B Offline
              Brian_TheLion
              wrote on last edited by
              #9

              Thanks Griff. I should now appear as Brian the Lion if all goes well (the name just popped up in my head). Brian

              1 Reply Last reply
              0
              • OriginalGriffO OriginalGriff

                BTW Brian, you do realize you can have a better username than "Member 14154627" if you want? It's easy to do, just hover over your username at the top right and select "Settings" - change "Your Display Name" to one that is free ("Brian" is taken, but "Brian The Great" isn't for example - though that last may be a little presumptuous :laugh: ). Click "Save My Settings" and you have a new display name

                Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                B Offline
                B Offline
                Brian_TheLion
                wrote on last edited by
                #10

                Hopefully this time I appear as BrianTheLion Brian

                CHill60C 1 Reply Last reply
                0
                • OriginalGriffO OriginalGriff

                  I don't tend to move them, instead I add a reference to the project, so I get the "latest version" if it gets updated (and a copy of the DLL will get added to your debug or release folders) or I add the project as an "Existing Project" to the solution which lets me update the DLL project from both solutions (that one takes a little discipline in order to not break other apps!) My Utilities are never constant - I add methods and classes to them all the time, and this way I get the "Latest version" to work with regardless of the project I am working on. The other solution is to install your DLL in the GAC but that means strong names and so forth: How to: Install an assembly into the global assembly cache | Microsoft Docs[^]

                  Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                  B Offline
                  B Offline
                  Brian_TheLion
                  wrote on last edited by
                  #11

                  Thanks for the link Griff, it will be very useful. Brian

                  1 Reply Last reply
                  0
                  • L Luc Pattyn

                    Hi, when you want to reuse a library (a managed code DLL file), you must “add a reference” and Visual Studio will include the DLL in your new project and copy it to the approapriate location. Copying the file yourself would not be sufficient. :)

                    Luc Pattyn [My Articles] Nil Volentibus Arduum

                    B Offline
                    B Offline
                    Brian_TheLion
                    wrote on last edited by
                    #12

                    Hi Luc. When you say reference do you mean add "using Engine3" to my code? If I did that then it still needs to know where to find Engine.dll, maybe your referring to something else. Brian

                    L 1 Reply Last reply
                    0
                    • B Brian_TheLion

                      Hi Luc. When you say reference do you mean add "using Engine3" to my code? If I did that then it still needs to know where to find Engine.dll, maybe your referring to something else. Brian

                      L Offline
                      L Offline
                      Luc Pattyn
                      wrote on last edited by
                      #13

                      There is a menu item that says either “add ...” or “add reference”, it may be a context menu for your project in the “solution pane”. Look around and you will find it. :)

                      Luc Pattyn [My Articles] Nil Volentibus Arduum

                      B 2 Replies Last reply
                      0
                      • L Luc Pattyn

                        There is a menu item that says either “add ...” or “add reference”, it may be a context menu for your project in the “solution pane”. Look around and you will find it. :)

                        Luc Pattyn [My Articles] Nil Volentibus Arduum

                        B Offline
                        B Offline
                        Brian_TheLion
                        wrote on last edited by
                        #14

                        OK thanks. Brian

                        1 Reply Last reply
                        0
                        • L Luc Pattyn

                          There is a menu item that says either “add ...” or “add reference”, it may be a context menu for your project in the “solution pane”. Look around and you will find it. :)

                          Luc Pattyn [My Articles] Nil Volentibus Arduum

                          B Offline
                          B Offline
                          Brian_TheLion
                          wrote on last edited by
                          #15

                          I think I found it as Reference Manager. I have a choice of Solution under Projects or Solution under Shared Projects to browse for the dll file.There is also 'Browse recent' but I don't think that's the right one to use. Brian

                          L 1 Reply Last reply
                          0
                          • B Brian_TheLion

                            Hopefully this time I appear as BrianTheLion Brian

                            CHill60C Offline
                            CHill60C Offline
                            CHill60
                            wrote on last edited by
                            #16

                            At the moment it says "Brain" instead of "Brian" … but that's quite cool :)

                            OriginalGriffO B 3 Replies Last reply
                            0
                            • CHill60C CHill60

                              At the moment it says "Brain" instead of "Brian" … but that's quite cool :)

                              OriginalGriffO Offline
                              OriginalGriffO Offline
                              OriginalGriff
                              wrote on last edited by
                              #17

                              CHill60 wrote:

                              that's quite cool animal cruelty

                              FTFY!

                              Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                              CHill60C 1 Reply Last reply
                              0
                              • CHill60C CHill60

                                At the moment it says "Brain" instead of "Brian" … but that's quite cool :)

                                B Offline
                                B Offline
                                Brian_TheLion
                                wrote on last edited by
                                #18

                                Opps I see what you mean. It won't let me change to BrianTheLion (says it's taken) so BriainTheLion well have to do.

                                1 Reply Last reply
                                0
                                • B Brian_TheLion

                                  I think I found it as Reference Manager. I have a choice of Solution under Projects or Solution under Shared Projects to browse for the dll file.There is also 'Browse recent' but I don't think that's the right one to use. Brian

                                  L Offline
                                  L Offline
                                  Luc Pattyn
                                  wrote on last edited by
                                  #19

                                  The details vary for different versions of Visual Studio. The dialog you want is called "Add Reference" in VS2008, and "Reference Manager" in VS2015, I don't know for other versions (VS2019 has been made available just now). And I never used the "shared projects" feature. :)

                                  Luc Pattyn [My Articles] Nil Volentibus Arduum

                                  B 1 Reply Last reply
                                  0
                                  • CHill60C CHill60

                                    At the moment it says "Brain" instead of "Brian" … but that's quite cool :)

                                    B Offline
                                    B Offline
                                    Brian_TheLion
                                    wrote on last edited by
                                    #20

                                    It should be BrianTheLoin. It may have picked up Brain from my computer. When the tech installed the operating system he typed in Brain instead of Brian by mistake. Brian

                                    OriginalGriffO 1 Reply Last reply
                                    0
                                    • OriginalGriffO OriginalGriff

                                      CHill60 wrote:

                                      that's quite cool animal cruelty

                                      FTFY!

                                      Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                                      CHill60C Offline
                                      CHill60C Offline
                                      CHill60
                                      wrote on last edited by
                                      #21

                                      :laugh:

                                      1 Reply Last reply
                                      0
                                      • B Brian_TheLion

                                        It should be BrianTheLoin. It may have picked up Brain from my computer. When the tech installed the operating system he typed in Brain instead of Brian by mistake. Brian

                                        OriginalGriffO Offline
                                        OriginalGriffO Offline
                                        OriginalGriff
                                        wrote on last edited by
                                        #22

                                        And now you have BriainTheLion! :laugh:

                                        Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                                        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                        1 Reply Last reply
                                        0
                                        • B Brian_TheLion

                                          Hi Eddy. I just want to use some of the classes within Engine3.dll in a new project. So I need to copy Engine.dll from my old project over to my new project but don't know where the destination is to put Engine3.dll Brian

                                          L Offline
                                          L Offline
                                          Lost User
                                          wrote on last edited by
                                          #23

                                          The assembly would need to become part of the project; easiest way to do so is to create a "bin" folder (or similar) and drop them all there, with "Copy to target" to true. When building, the assemblies would be copied to the build-folder.

                                          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

                                          B 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