none
Will the size program going high if program net 2 is compiled in 4? RRS feed

  • Question

  • Hi, I am wondering if I have program that already compiled on net framework version 2 will compiled on net framework 4. Is my program size will high or same? Thank you.
    Wednesday, December 20, 2017 9:32 AM

All replies

  • Hi Olivia,

    Thank you for posting in MSDN forum.

     >>Is my program size will high or same?

    I did a test, result: the size is smaller.

    Best Regards,


    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.

    • Marked as answer by Olivia Olga Thursday, December 28, 2017 3:59 AM
    • Unmarked as answer by Olivia Olga Wednesday, January 3, 2018 9:33 AM
    Thursday, December 21, 2017 7:02 AM
    Moderator
  • Hi, Wen Xu

    Could you please give me an example or a result test, so I could prove it.

    Thank you

    Thursday, December 28, 2017 4:01 AM
  • Hi Olivia,

    I new Windows Froms App project, which target .NET Framework 2.0,  then right click and publish it:

    Then I new another project targeting .Net Framework 4.0,which named WindowsFormsApp1

    After publish it, I open the folder in File explorer, compared with them, find the program size becomes smaller:

    Best Regards,


    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.

    Thursday, December 28, 2017 6:22 AM
    Moderator
  • Hi, Wen Xu

    I've tried with this project

    Then I compiled it with net 2 and 4, and the result like this

    The left side is net 4, the right side is net 2. This is the size of exe.

    Tuesday, January 2, 2018 10:28 AM
  • Hi Olivia,

    What’s your VS version?

    You can try to create a new C#>Window Form application target with .NET Framework 2.0, and a button and save, then right click the project name and Publish it. After that, right click the project name and choose ‘Properties’ and change the target Framework to .NET Framework 4 and save, then Publish it again with another store folder, then compare the size of the setup.exe. It seems the sizes are the same on my side and my VS version is VS 2017.

    Best regards,

    Sara


    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, January 8, 2018 8:00 AM
    Moderator