locked
DLL or EXE RRS feed

  • Question

  • User24901372 posted

    Hi All,

     Can anybody tell me the what logic (Concept) tell visual studio to create DLL (if there is a web application)  or EXE (If application is window application or console)

     -Arvind

    Saturday, May 30, 2009 6:57 AM

Answers

  • User-690506545 posted

    Yes, I know that if i create a web site there will be a dll and if i create a window project it will create a EXE.

     But i want to know that, what setting change in visual studio if i create web or window project.

    Means that how visual studio know that he have to create exe or dll.

    or what things decided the output as exe or dll. 

     

    You've already answered your own question - Visual Studio knows what sort of project you are working on - so if you are working on a console app or a windows forms app, or a service, it creates a .exe

    If you are working on a class library, it creates a .dll

    If you are working on a web application, it creates all the .aspx pages and a .dll (or a couple of .dlls depending on how you configure it).

    I think it might help us answer your question better if we knew WHY you want to know these things - each project type is compiled in a unique way by msbuild.exe - you can't compile a class library as a .exe, and you can't compile a windows forms app as a .dll mainly because they would simply not work.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 2, 2009 6:33 AM

All replies

  • User-1171043462 posted

    What that means?

    Saturday, May 30, 2009 7:15 AM
  • User24901372 posted

    means that, when we create a window application the visual studio (VS) produce EXE and when we create a web application then it create a DLL.

    So i just want to know that what thing make a difference in VS, 

    or what are the difference in the settings of the web and window editor structure in VS that make decesion to create DLL or EXE.

     

    Saturday, May 30, 2009 7:59 AM
  • User-1171043462 posted

    means that, when we create a window application the visual studio (VS) produce EXE and

    You can create a Class Library (DLL) or Console or Windows (EXE) application

    when we create a web application then it create a DLL.

     

    No no DLL is created when you select Web Site project  I really don't know what you are after about?

     

    Also the decison is based on what you select if you select windows it creates windows and when you select web it creates web

    And i don't think any serious logic is hidden anywhere that you are trying to find out

    Saturday, May 30, 2009 9:17 AM
  • User-925286913 posted

    The login behind this may be:

    EXE requires Execute pemission to run. Windows application are run on client PC and uses Client resources.

    The Web Server (Production Server where we deploy our site) may not give you the Execute permission if you don't have dedicated server.

    DLL does not require Execute permission hence it can be used with Websites even if you don't have dedicated server.

    Saturday, May 30, 2009 10:07 AM
  • User24901372 posted

    Yes, I know that if i create a web site there will be a dll and if i create a window project it will create a EXE.

     But i want to know that, what setting change in visual studio if i create web or window project.

    Means that how visual studio know that he have to create exe or dll.

    or what things decided the output as exe or dll. 

     

     

    Tuesday, June 2, 2009 6:27 AM
  • User-690506545 posted

    Yes, I know that if i create a web site there will be a dll and if i create a window project it will create a EXE.

     But i want to know that, what setting change in visual studio if i create web or window project.

    Means that how visual studio know that he have to create exe or dll.

    or what things decided the output as exe or dll. 

     

    You've already answered your own question - Visual Studio knows what sort of project you are working on - so if you are working on a console app or a windows forms app, or a service, it creates a .exe

    If you are working on a class library, it creates a .dll

    If you are working on a web application, it creates all the .aspx pages and a .dll (or a couple of .dlls depending on how you configure it).

    I think it might help us answer your question better if we knew WHY you want to know these things - each project type is compiled in a unique way by msbuild.exe - you can't compile a class library as a .exe, and you can't compile a windows forms app as a .dll mainly because they would simply not work.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 2, 2009 6:33 AM
  • User-82109136 posted

    Try this:

    Go to the Project Properties by either using the Menu or right clicking the Project in the solution explorer. You should see an Output Type property on the Application tab.  This controls wether and dll or exe is created.

    Hope this helps.

    Tuesday, June 2, 2009 6:46 AM
  • User-690506545 posted

    Try this:

    Go to the Project Properties by either using the Menu or right clicking the Project in the solution explorer. You should see an Output Type property on the Application tab.  This controls wether and dll or exe is created.

    Hope this helps.

     

    You can do this, yes, but if you have a class library you can't just change the output type to "Windows Application" and expect it to actually compile.  The first compiler warning will be about a suitable entry point (it's an executable not a library, so needs to start somewhere), plus there won't be any forms, so there won't be any user interface.  etc. etc.

    The same goes for web app -> exe

    The same goes for windows service -> windows application

    They are all unique and set up initially using project templates within visual studio.

    Tuesday, June 2, 2009 7:01 AM
  • User880837085 posted

    hello

    I think , because when you complie a windows application ,Compiler generate an EXE file including information about current machine  and any machine is like yours. EXE files are accepted in windows to run.

    But in a web-app, accepted files to show and view by users are .html,htm,asp,aspx ,php and etc.because for web browser defined when face with a aspx file, how do they behaive?

    a dll file includes methods and function and they called into program.Dll file are not executable files.

    hope this help you.

    Tuesday, June 2, 2009 8:59 AM