none
Double compilation of a project RRS feed

  • Question

  • Hi, is there a way to compile a project simultaneously as an EXE and as a DLL? I have a project that I use in both ways and I don't want to change the properties every time.
    Thursday, October 31, 2019 8:40 AM

All replies

  • >Hi, is there a way to compile a project simultaneously as an EXE and as a DLL? I have a project that I use in both ways and I don't want to change the properties every time.

    I'd have 2 projects that use the same shared code.

    Dave

    Thursday, October 31, 2019 11:19 AM
  • Sorry, but how can you do this?
    Thursday, October 31, 2019 3:04 PM
  • >Sorry, but how can you do this?

    Create an appropriate project and add your common source files to it as linked files.

    Dave

    Thursday, October 31, 2019 4:53 PM
  • Hi Francesco Leo,

    Welcome to MSDN forum.

    Not sure which kind of project do you use, I suggest you could try to use a ClassLibrary project.

    For example, use Console App project I could compile and generate a EXE file, then if I add a ClassLibrary project in the same solution and put almost everything same with Console App project to this project, I will get both EXE file and DLL file once I compile/build the solution.

    In addition, I also find a similar issue, you could refer to it and I hope this could help you to solve your issue.

    Any feedback will be expected.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 1, 2019 7:29 AM
  • I have to do some tests to understand the mechanisms well. I'll let you know the results
    Friday, November 1, 2019 10:54 AM
  • Or maybe make only a DLL, and use something like rundll32.exe instead of the exe.

    -- pa

    Friday, November 1, 2019 6:01 PM
  • Hi Francesco Leo,

    Thank you for the feedback.

    If you have any update, feel free to let us know. We are looking forward to hearing from you.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 4, 2019 9:32 AM