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. Renaming .exe file to .dll file ???

Renaming .exe file to .dll file ???

Scheduled Pinned Locked Moved C#
csharpvisual-studiohelpquestion
5 Posts 4 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.
  • L Offline
    L Offline
    luckyShek
    wrote on last edited by
    #1

    hi there, I had created a UserControl.exe. I want to add it to a project by using "Add References". But it only take .dll file. 1) Can I just rename UserControl.exe to UserControl.dll ? 2) Will it cause any error ?? 3) What's the best to create a userControl file with .dll in vs.net ? Thank you very much. ;)

    C L H 3 Replies Last reply
    0
    • L luckyShek

      hi there, I had created a UserControl.exe. I want to add it to a project by using "Add References". But it only take .dll file. 1) Can I just rename UserControl.exe to UserControl.dll ? 2) Will it cause any error ?? 3) What's the best to create a userControl file with .dll in vs.net ? Thank you very much. ;)

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      luckyShek wrote: What's the best to create a userControl file with .dll in vs.net ? Set the compiler to build a dll. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

      L 1 Reply Last reply
      0
      • C Christian Graus

        luckyShek wrote: What's the best to create a userControl file with .dll in vs.net ? Set the compiler to build a dll. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

        L Offline
        L Offline
        luckyShek
        wrote on last edited by
        #3

        Thanks

        1 Reply Last reply
        0
        • L luckyShek

          hi there, I had created a UserControl.exe. I want to add it to a project by using "Add References". But it only take .dll file. 1) Can I just rename UserControl.exe to UserControl.dll ? 2) Will it cause any error ?? 3) What's the best to create a userControl file with .dll in vs.net ? Thank you very much. ;)

          L Offline
          L Offline
          leppie
          wrote on last edited by
          #4

          1+2. Yes, in theory everything should be ok. 3. See CG's post. You can actually reference an exe if you compile from the commandline. top secret
          Download xacc-ide 0.0.6 now!
          See some screenshots

          1 Reply Last reply
          0
          • L luckyShek

            hi there, I had created a UserControl.exe. I want to add it to a project by using "Add References". But it only take .dll file. 1) Can I just rename UserControl.exe to UserControl.dll ? 2) Will it cause any error ?? 3) What's the best to create a userControl file with .dll in vs.net ? Thank you very much. ;)

            H Offline
            H Offline
            Heath Stewart
            wrote on last edited by
            #5

            An EXE and a DLL contain different headers. An EXE contains an entry point while a DLL does not, though it typically contains a load address of where in memory relative to the EXE base it should be loaded. In the case of .NET assemblies, the EXE entry point references mscoree.dll!_CorExeMain, which creates the unmanaged AppDomain, loads a managed AppDomain then your assembly, and runs the entry point. A DLL will simply load into the process space but contains no entry point. While the IL module(s) contained in the assembly are basically file format-agnostic, the PE/COFF headers of the executable that contain the manifest and IL module(s) (and any other embedded files or resources) are different. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]

            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