none
Reduce Framework size when packaging from visual studio RRS feed

  • Question

  • I've just created a windows application, that in total is around 500KB in size. However in Visual Studio 2008 SP1 i've told it to package the framework setup files into my application. This ballons my app setup folder to be 198MB! This is a free program that people download from my site. I do not want huge amounts of bandwidth taken up from it...

    I also noticed that when selecting .NET Framework 3.5 as a pre-requisite, it also puts .NET 2.0, 3.0 and 3.5 in the directory. Why?

    Also, when selecting 2.0 as pre-requisite the installer automatically downloads and installs. Now, if i select "download from vendors site" when setting my application up it simply takes me to a web page and its up to me to select the correct page and download the framework. Most users wont have a clue how to do this!

    Is there any way I can make this better? Ideally a much smaller file size in the setup directory would be ideal. I cant see the point in packing 3 seperate versions of the framework into the setup folder when they all should work independently of each other...
    Thursday, September 11, 2008 9:47 AM

Answers

  • Firstly, the .NET Framework 3.5 is a combination of 2.0, 3.0, and 3.5.  Think of it as a wedding cake... the first layer is 2.0.  Then 3.0 adds more functionality on top of 2.0, but runs on top of it... not independently, or side by side.  3.5 is another layer.  Thats why those files are included when you request 3.5.

    As it turns out, if you aren't using LINQ or a few other features in 3.5, you might only need 3.0.  If you aren't using WCF, WPF, a few other features, you may only need 2.0.  This can help reduce disk space, if it applies.

    I don't understand what you mean by "download from vendor's site" causing you to go to a page.  That's not the way it's designed or tested to work, but we probably just need to clarify what we mean :-).   If you are using a Setup Project (as opposed to ClickOnce), it's possible you've only set the necessary version in one location, and it sounds like the "pre-requisites" dialog.  You also need to go to the Launch Conditions Editor, edit the .NET Frameworks launch condition and set the version to 2.0 as well.  I'm guessing that's what's causing the dialog to come up that takes you to a .NET Frameworks web page.

    I ohpe this helps... please let me know if you have any remaing quesitons.

    David Guyer - Deployment Technologies Group PM
    • Marked as answer by Figo Fei Monday, September 15, 2008 2:32 AM
    Friday, September 12, 2008 4:47 AM

All replies

  • Firstly, the .NET Framework 3.5 is a combination of 2.0, 3.0, and 3.5.  Think of it as a wedding cake... the first layer is 2.0.  Then 3.0 adds more functionality on top of 2.0, but runs on top of it... not independently, or side by side.  3.5 is another layer.  Thats why those files are included when you request 3.5.

    As it turns out, if you aren't using LINQ or a few other features in 3.5, you might only need 3.0.  If you aren't using WCF, WPF, a few other features, you may only need 2.0.  This can help reduce disk space, if it applies.

    I don't understand what you mean by "download from vendor's site" causing you to go to a page.  That's not the way it's designed or tested to work, but we probably just need to clarify what we mean :-).   If you are using a Setup Project (as opposed to ClickOnce), it's possible you've only set the necessary version in one location, and it sounds like the "pre-requisites" dialog.  You also need to go to the Launch Conditions Editor, edit the .NET Frameworks launch condition and set the version to 2.0 as well.  I'm guessing that's what's causing the dialog to come up that takes you to a .NET Frameworks web page.

    I ohpe this helps... please let me know if you have any remaing quesitons.

    David Guyer - Deployment Technologies Group PM
    • Marked as answer by Figo Fei Monday, September 15, 2008 2:32 AM
    Friday, September 12, 2008 4:47 AM
  • Hi David,

    Thanks for your reply.

    I have managed to get around the problem of the installer directing to a webpage. Not sure how that happened but once I built the setup project it seemed to be OK.

    However, i've now set 3.5 as a pre-requisite (I actually only need 3.0 as I use the System.Printing namespace) but the framework doesnt install on client machines. The machine im testing is a Win XP Pro SP2. It downloads, then when it comes to install I get a dialog box over the top of the existing one saying "Please wait while setup configures, this may take several minutes..". The progress never changes, and after leaving the PC on all night I came back this morning to find it at the same stage.

    I saw a fix to something similar to this, but I cant expect people who download my free software to have to start changing registry settings just to get it to work. I will try just selecting 3.0 instead and see if this works, but im rather concerned about this. Do you know of any fix that doesnt require modification of the client machine?

    If you need more info/screenshots please let me know.

    Regards,
    Friday, September 12, 2008 8:15 AM