Conditionally compile to exe or dll


  • Hi,

    Using Visual Studio 2013/15, I want to know if its possible to be able to make build configuration in such a way that I can easily switch between compiling my project to dll or exe whatever I decide, without going to Project Properties> Application > Output Type.




    Tuesday, August 09, 2016 9:42 AM


  • Have you tried to make a copy of your current configuration, and then make the adjustments? This can be done in Configuration Manager dialog (right-clicking the solution node in Solution Explorer). For example, if you currently have the “Debug” configuration, set for EXE, then you can create a new configuration called “Debug-DLL”, having similar options, excepting the Output Type. Then you simply select the active configuration from the toolbars before compilation. (If you do not see it, then you can easily customise the toolbars).

    Tuesday, August 09, 2016 6:30 PM