Including the .NET Framework on the Applications CD
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Including the .NET Framework on the Applications CD

  1. #1
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Including the .NET Framework on the Applications CD

    I'm distributing an Application (which runs directly off of a CD, no install).

    1) How can I set up my autorun.inf to check if the required version of the .NET Framework is already installed on the PC?

    2) How can I prompt the User to install it if it is not?

    3) How can I include the .NET Framework on the CD, so that it does not need to be downloaded?

    I realise these questions overlap a bit.

    Does anyone have any experince with this? I think Hannes mentioned something a while back?

    Thank you.
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    210

    Re: Including the .NET Framework on the Applications CD

    Use the Visual Studio installer, which adds a bootstrapper to it.
    So if someone wants to install your .NET application, the framework will be installed before, if not available.

    In the VS setup you can either choose to install from the internet, or to add the approx. 20 MB redist to your installation.


    If you cannot use the Visual Studio Setup for any reason, your only chance is to have a native setup.exe, which checks
    for the installed frameworks before (Google for sources) and then either install the files directly, or by starting another .net Setup.
    Last edited by MNovy; January 12th, 2010 at 11:14 PM.

  3. #3
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Re: Including the .NET Framework on the Applications CD

    MNovy, I did not realise that the Installer gave you the option of including the redist. I'll check it out. Ideally, I do NOT want to install my App (just run of CD), but the goal posts are moving at the moment, so most likely I'll be installing my App and incorporating the redist (now I know that is an option).
    Thank you.
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

  4. #4
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,092

    Re: Including the .NET Framework on the Applications CD

    If you really don't want an installer or something, perhaps you could make use of an HTA file. This HTA file can check the existance of .NET, if you program it correctly. Do you know HTML ¿

    I know I'm taking a long shot here, but I honestly feel this artcile can help you :

    http://www.codeguru.com/vb/gen/vb_mi...le.php/c16551/

    It is in VB.NET though, but the HTA codings would be more or less the same.

    Sorry if you feel it can't work...

  5. #5
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Including the .NET Framework on the Applications CD

    I would throw in my $0.02 here and just mention that, unless there is some important reason to not have an installer for you program, you should just make one. I say that because, as you know, .NET applications have major dependencies. It is going to be very difficult to ensure that you are in a proper environment when your program is run should you go the stand alone executable route.

  6. #6
    Join Date
    Oct 2008
    Location
    Cologne, Germany
    Posts
    756

    Re: Including the .NET Framework on the Applications CD

    Quote Originally Posted by BigEd781 View Post
    unless there is some important reason to not have an installer for you program,
    installers are evil
    Quote Originally Posted by BigEd781 View Post
    you should just make one.
    please don't do it. people will thank you for that

    portable apps are cool.
    win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming

    remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation

    private lessons are not an option so please don't ask for help in private, I won't replay

    if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know

  7. #7
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Including the .NET Framework on the Applications CD

    Quote Originally Posted by memeloo View Post
    installers are evil

    please don't do it. people will thank you for that

    portable apps are cool.
    Can you expand on that a bit? Is it still "cool" when the application fails to initialize and provides the user with some cryptic error message? An installer can detect the version of .NET installed on the computer and upgrade it if needed. This is an accepted practice, it is not "evil". You cannot do that with a stand alone executable. It would be great, I agree, but we have to live in reality.

  8. #8
    Join Date
    Oct 2008
    Location
    Cologne, Germany
    Posts
    756

    Re: Including the .NET Framework on the Applications CD

    if this is an accepted practice, why are there still more and more portable apps, without installers? if it's possible I always download the portable version. just extract and use it and most of the time there is no problem with programm settings unlike in the "normal" version. I hope one day there will be no installers. and if so, then only simple setups but all apps will be portable. ms office, visual studio, maya etc. one folder one app, no crazy wxs multigigabyte folders. it's so annoying having to install all this ****** after format c:
    win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming

    remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation

    private lessons are not an option so please don't ask for help in private, I won't replay

    if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know

  9. #9
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,370

    Re: Including the .NET Framework on the Applications CD

    I sort of look at things the other way and think, if anything, apps without installers are evil.

    As time passes, and the need for security becomes even more important, the days where you can copy a couple of files onto your computer to 'install' an app will be less likely. My opinion is that in the future OS's will force all apps to go through installer before allowing them to run.

  10. #10
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Re: Including the .NET Framework on the Applications CD

    I've been investigating the option of including .NET Framework 3.5SP1 on the CD with my application.

    On VS2010Beta2 (but don't think it matters), there is an option it "Download prerequisites from the same location as my application". I assume I need that option. But then, what do I include in the same location as my application? If I download .net 3.5SP1 it downloads a 2.82MB dotnetfx35setup.exe file. I'm pretty sure that exe is not enough, infact I believe that exe just initiates the main download which is the bit I want to avoid.

    Has anyone done this before and could point me in the right direction?

    Thanks
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

  11. #11
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,370

    Re: Including the .NET Framework on the Applications CD

    Quote Originally Posted by rliq View Post
    On VS2010Beta2 (but don't think it matters), there is an option it "Download prerequisites from the same location as my application". I assume I need that option. But then, what do I include in the same location as my application?
    I'd guess that this option is for downloading the app and dependencies from a remote location. Why not try a few settings yourself and see what works? I'd pick the option that includes the exe, its dependencies and the .net framework on the cd.

  12. #12
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Re: Including the .NET Framework on the Applications CD

    As my App only requires .NET 2.0, I have included the .NET 2.0 runtime with my App.

    It seems if you download the .NET 2.0 runtime, you get the whole thing, not just a stub that does the download (like in the case of .NET 3.5).

    So now, I install my App. If it prompts me to download .NET 2.0, I say NO. I then install .NET 2.0 (previously downloaded and packaged with my App), then install my App. All of this without being connected to the Internet.

    This all works fine. Not sure how this would be done for a .NET 3.5 App though as the install of .NET 3.5 runtime 'seems' to need Internet access.
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

  13. #13
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,370

    Re: Including the .NET Framework on the Applications CD

    Since the .Net 3.5 redistributable is available as a full package, one would expect it to be able to be available on the cd as well.

    http://www.microsoft.com/downloads/d...displaylang=en

    Sounds like you need to do a bit more research to figure out how if it's important to you to use 3.5.

  14. #14
    Join Date
    Jun 2001
    Location
    Melbourne/Aus (C# .Net 4.0)
    Posts
    686

    Re: Including the .NET Framework on the Applications CD

    Arjay,

    That download is just 2.82MB, I don't believe that is the FULL 3.5SP1 redist?

    I'm pretty sure if you execute that file, it will then access the Internet to download the FULL redist. I may be wrong, I don't have the machine to try it on at the moment.

    Thanks
    Rob.
    Rob
    -
    Ohhhhh.... Old McDonald was dyslexic, E O I O EEEEEEEEEE.......

  15. #15
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,370

    Re: Including the .NET Framework on the Applications CD

    Quote Originally Posted by rliq View Post
    Arjay,

    That download is just 2.82MB, I don't believe that is the FULL 3.5SP1 redist?
    If you scroll down on the page, you'll find:

    Full Package
    To download the full package, rather than the bootstrapper, click on the link below:
    .NET Framework 3.5 Service Pack 1 (Full Package)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center