Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

Scenarios where .NET Framework 3.5 setup tries to connect to the Internet and how to avoid them

Scenarios where .NET Framework 3.5 setup tries to connect to the Internet and how to avoid them

  • Comments 30

The setup program for the .NET Framework 3.5 and the Visual Studio 2008 Express Editions contains logic that will cause it to attempt to connect to the Internet to download files in some scenarios.  I've heard from several folks who have asked me why this happens and how to prevent it in case they need to install in a fully offline scenario where the system has no Internet connectivity.  This post will describe the cases I know of where .NET Framework 3.5 and VS 2008 Express Edition setup will attempt to download files from the Internet and how they can be avoided if necessary.

Case 1 - Missing setup packages

.NET Framework 3.5 and Visual Studio 2008 Express Edition setup both have logic to search in relative paths next to setup.exe for packages that need to be installed during the setup process.  If any of the packages are not found in those relative paths, setup will use URL values constructed from information in the setup data file named baseline.dat to attempt to download the packages from the Internet instead.  If setup cannot connect to the Internet or the download fails for any reason, then setup will fail and report an error.

In order to avoid requiring Internet access in this scenario, you need to make sure to construct an install point for the .NET Framework 3.5 or the Visual Studio 2008 Express Editions that include all packages that could need to be installed in your environments.  You can find more information about how to do this in the following blog posts:

If you are interested, you can find more information about how this automatic download functionality works in .NET Framework 3.5 setup here and here.  The VS 2008 Express Edition setup packages use the same setup.exe code as the .NET Framework 3.5 setup, so the behind-the-scenes logic is similar for those packages.

Case 2 - Installing the .NET Framework 3.5 on a non-English OS

The .NET Framework 3.5 setup contains logic to check the language of the OS that it is being installed on and attempt to install a language pack that matches the OS language if one is available.  However, the "full install" setup package for the .NET Framework 3.5 does not include any language packs, so setup will attempt to connect to the Internet when this package is run on many non-English language OS's.

In order to avoid requiring Internet access in this scenario, you can use one of the following techniques:

  • Download the .NET Framework 3.5 language packs that could be needed in your environments and copy them into your installable .NET Framework 3.5 layout.  You can find download locations for the .NET Framework 3.5 language packs in this blog post and instructions regarding where to copy them in your .NET Framework 3.5 installable layout in item 2 in this blog post.
  • Run .NET Framework 3.5 setup with the /lang switch and pass in the value ENU to prevent it from attempting to install any language packs.  This is described in item 1 in this blog post.

Note - .NET Framework 3.5 setup is configured to report warnings as opposed to failures if it is unable to download or install language packs.  That means that the above steps are not required in order to allow setup to succeed in offline scenarios, but these steps are required if you want to avoid any attempts to connect to the Internet during .NET Framework 3.5 setup on non-English operating systems.

Case 3 - Checking for a new version of setup

The setup programs for the .NET Framework 3.5 and the Visual Studio 2008 Express Editions contain logic to cause them to connect to the Internet to search for an updated version of the setup program.  This will only happen if setup is run with the /web command line switch.  The .NET Framework 3.5 setup program (dotnetfx35setup.exe) and the web download bootstrapper packages for the Visual Studio 2008 Express Editions (vbsetup.exe, vcsetup.exe, vcssetup.exe and vnssetup.exe) are self-extracting packages that are configured to unpack and then run the setup.exe contained within the package with the /web switch.

In order to avoid having .NET Framework 3.5 setup connect to the Internet to search for an updated version of itself, you must do the following:

  1. Create an installable layout using the steps in this blog post
  2. Go to the folder that you extracted the .NET Framework 3.5 setup files to, find the file named dotnetfx35setup.exe and run dotnetfx35setup.exe /x to unpack it
  3. When prompted, choose to unpack it to the same folder it is currently located in
  4. Instead of using the file dotnetfx35setup.exe to start installing the .NET Framework 3.5, use the file setup.exe in the unpacked location.  This will cause setup to run without the /web switch and skip the step of connecting to the Internet to search for a new copy of setup.  The setup.exe file takes the same command line parameters as dotnetfx35setup.exe (such as the /q and /norestart switches for silent installation).

For the Visual Studio 2008 Express Editions, only the web download bootstrapper packages available from this download page are configured to use the /web switch.  If you use the instructions for creating an installable layout in this blog post, you will end up unpacking the package that has the /web switch built into it, and running from the layout you create will not end up searching for a new instance of itself during setup.

Note - .NET Framework 3.5 and VS 2008 Express Edition setups are configured to not fail if they are unable to connect to the Internet to check for a new instance of setup.  That means that the above steps are not required in order to allow setup to succeed in offline scenarios, but these steps are required if you want to avoid any attempts to connect to the Internet during .NET Framework 3.5 setup.

  • What about the case when setup tries to send feedback about setup experience? I don't know the switch for it, but it is after the whole affair is over.

  • Hi Tanveer Badar - The .NET Framework 3.5 setup package is supposed to be configured so that it won't send feedback after successful installations in silent mode - it should only attempt to send feedback after failed installs.

    To control this behavior, you can open the file setup.sdb, locate the section named [VSSetupWatson] and set all of the Enabled and Headless values to 0 (they are set to 1 by default).

    You also should be able to set registry values to control these settings if you'd prefer to do that instead of changing setup data files.  The registry values look like the following:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PCHealth\ErrorReporting\DW\VSSetup\Microsoft .NET Framework 3.5\3.5.21022.08_ORCAS_X86_NET]

    VSSWSectionEnabled=0 (REG_DWORD)

    VSSWUXEnabled=0 (REG_DWORD)

  • I decided to write this post after I found myself a little bit lost trying to find customer's answers

  • PingBack from http://www.hilpers-esp.com/664022-todo-un-problemon

  • BIG thx for this blog post! I did look for two evenings to get .NET framework installed on a virtual machine. It always got stuck on the part where it did try to connect to some microsoft site to download an update (for whatever reason it did get stuck there - downloading via FF/IE was just fine)!

    After extracting the full installer and also within there the other installer it and putting the language switch in place (and not using the /web switch) all went smooth and fine!!

  • Works like a charm! all i did was case 3. thanks for writing this.

  • getting an error to insert disk and find the location for netfx35_x86.exe

  • Hi xchris5442x - What exactly are you doing when you see this error?  Are you trying to implement one of the 3 workarounds listed in this blog post?  If so, which one?

    Or are you just trying to do a normal install or repair for the .NET Framework?  If it is the latter, I'd suggest trying to use the steps and tool listed at blogs.msdn.com/.../8108332.aspx to manually remove the .NET Framework from your computer, and then try to re-install the .NET Framework 3.5 SP1.

  • Thanks alot for this...saved me in a crisis.

  • Why is not microsoft giving us the direct download link for .net framework 3.5. Because the preinstaller restarts the download repeatedly and it takes too much time for guys with slow internet connection.

  • Hi Dess - There is a full install package for the .NET Framework 3.5.  The link is available at the bottom of the download page for the web installer at www.microsoft.com/.../details.aspx, but that link is kind of buried amongst all of the other text on that page.

    Here is a direct link - download.microsoft.com/.../dotnetfx35.exe.

  • Hi Dess - There is a full install package for the .NET Framework 3.5.  The link is available at the bottom of the download page for the web installer at www.microsoft.com/.../details.aspx, but that link is kind of buried amongst all of the other text on that page.

    Here is a direct link - download.microsoft.com/.../dotnetfx35.exe.

  • Case 3 solution worked for me. For a moment after running setup.exe, I thought it was the same story, but after a while it went fine

  • I am not finding setup.exe after the extraction step.  Did MS change it so you can't do this any more?

  • Hi Ken Alverson - No, there haven't been any changes, and these steps should still work fine.  What is the exact command line that you're using when you try to extract the setup package and find setup.exe, and what files do you see in the folder after extraction is complete?

Page 1 of 2 (30 items) 12
Leave a Comment
  • Please add 1 and 7 and type the answer here:
  • Post