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. Compile Question

Compile Question

Scheduled Pinned Locked Moved C#
csharpquestiontutorial
5 Posts 3 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.
  • H Offline
    H Offline
    HahnTech
    wrote on last edited by
    #1

    How do you compile to a library in C#. or how can i bring a DLL into the final exe so I don't have to install the dll. I have classes that i use often and don't like just copying the .cs into my project. I'd like a library to link from but don't know how to make it. Thanks

    Ronald Hahn, CNT - Computer Engineering Technologist New Technologies Analyst HahnTech Affiliated With Code Constructors Edmonton, Alberta, Canada Email: rhahn82@telus.net

    L 1 Reply Last reply
    0
    • H HahnTech

      How do you compile to a library in C#. or how can i bring a DLL into the final exe so I don't have to install the dll. I have classes that i use often and don't like just copying the .cs into my project. I'd like a library to link from but don't know how to make it. Thanks

      Ronald Hahn, CNT - Computer Engineering Technologist New Technologies Analyst HahnTech Affiliated With Code Constructors Edmonton, Alberta, Canada Email: rhahn82@telus.net

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

      HahnTech wrote:

      How do you compile to a library in C#

      Create a class library project and just compile it ;)

      HahnTech wrote:

      or how can i bring a DLL into the final exe so I don't have to install the dll.

      copy the code over from the DLL to your form. This is ugly, the better way is:

      HahnTech wrote:

      I'd like a library to link from but don't know how to make it.

      Add a reference to your DLL from your form. In the solution explorer there a folder called "References". You can there rightclick, "Add Reference" -> "Browse" -> select your DLL regards

      H 1 Reply Last reply
      0
      • L Lost User

        HahnTech wrote:

        How do you compile to a library in C#

        Create a class library project and just compile it ;)

        HahnTech wrote:

        or how can i bring a DLL into the final exe so I don't have to install the dll.

        copy the code over from the DLL to your form. This is ugly, the better way is:

        HahnTech wrote:

        I'd like a library to link from but don't know how to make it.

        Add a reference to your DLL from your form. In the solution explorer there a folder called "References". You can there rightclick, "Add Reference" -> "Browse" -> select your DLL regards

        H Offline
        H Offline
        HahnTech
        wrote on last edited by
        #3

        I can make a DLL by using the create a class library project. And i can add a made dll as a reference into a new project but then i have to push the dll with the exe all the time. In C++ i can compile to a *.lib and tell the linker where the lib file is and it will compile the code from the lib into the exe and i don't need to push the lib all over the place. Is that possible in C#?

        Ronald Hahn, CNT - Computer Engineering Technologist New Technologies Analyst HahnTech Affiliated With Code Constructors Edmonton, Alberta, Canada Email: rhahn82@telus.net

        S 1 Reply Last reply
        0
        • H HahnTech

          I can make a DLL by using the create a class library project. And i can add a made dll as a reference into a new project but then i have to push the dll with the exe all the time. In C++ i can compile to a *.lib and tell the linker where the lib file is and it will compile the code from the lib into the exe and i don't need to push the lib all over the place. Is that possible in C#?

          Ronald Hahn, CNT - Computer Engineering Technologist New Technologies Analyst HahnTech Affiliated With Code Constructors Edmonton, Alberta, Canada Email: rhahn82@telus.net

          S Offline
          S Offline
          S Senthil Kumar
          wrote on last edited by
          #4

          You're looking for ILMerge[^].

          Regards Senthil _____________________________ My Blog | My Articles | WinMacro

          H 1 Reply Last reply
          0
          • S S Senthil Kumar

            You're looking for ILMerge[^].

            Regards Senthil _____________________________ My Blog | My Articles | WinMacro

            H Offline
            H Offline
            HahnTech
            wrote on last edited by
            #5

            Yes I am! Thank you!

            Ronald Hahn, CNT - Computer Engineering Technologist New Technologies Analyst HahnTech Affiliated With Code Constructors Edmonton, Alberta, Canada Email: rhahn82@telus.net

            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