Partilhar via


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

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.

Comments

  • Anonymous
    July 18, 2008
    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.

  • Anonymous
    July 20, 2008
    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_MACHINESOFTWAREPoliciesMicrosoftPCHealthErrorReportingDWVSSetupMicrosoft .NET Framework 3.53.5.21022.08_ORCAS_X86_NET] VSSWSectionEnabled=0 (REG_DWORD) VSSWUXEnabled=0 (REG_DWORD)

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

  • Anonymous
    January 17, 2009
    PingBack from http://www.hilpers-esp.com/664022-todo-un-problemon

  • Anonymous
    October 06, 2009
    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!!

  • Anonymous
    October 04, 2010
    Works like a charm! all i did was case 3. thanks for writing this.

  • Anonymous
    December 11, 2010
    getting an error to insert disk and find the location for netfx35_x86.exe

  • Anonymous
    December 11, 2010
    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.

  • Anonymous
    February 22, 2011
    Thanks alot for this...saved me in a crisis.

  • Anonymous
    February 26, 2012
    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.

  • Anonymous
    February 26, 2012
    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.

  • Anonymous
    February 26, 2012
    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.

  • Anonymous
    February 28, 2012
    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

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

  • Anonymous
    December 17, 2012
    The comment has been removed

  • Anonymous
    December 18, 2012
    c:UserkalversonDesktoplayoutwcudotNetFramework>dotNetFx35setup.exe /x c:UserskalversonDesktoplayoutwcudotNetFramework>dir /s setup.exe Volume in drive C is Hard Drive Volume Serial Number is )ABC-084 Fle Not Found c:UserskalversonDesktoplayoutwcudotNetFramework>

  • Anonymous
    December 18, 2012
    Hi Ken Alverson - What version of Windows are you running this on?  I saw a behavior on Windows 7 where dotnetfx35setup.exe silently exits without doing anything, even when you pass in the /x switch.  There is a Windows application compatibility shim that is preventing it from running because Windows 7 already comes with the .NET Framework 3.5 so there is normally no need to run dotnetfx35setup.exe on Windows 7.  However, it is necessary to run it for this scenario, and you can work around the shim by renaming dotnetfx35setup.exe and then running the renamed version with the /x switch.

  • Anonymous
    December 18, 2012
    I was able to use 7-zip to extract the files.  I did find setup.exe in the extracted folder.  Unfortunately, after copying the folder to the target Windows 8 test machine, setup.exe still wanted to connect and download the update.  Our application is old and only needs net 2.0.  Our silent install of net 2.0 works fine on Windows 7 and older, but on Windows 8 it somehow triggers the Framework 3.5 install and download.  The trouble is, our domain policy prevents the connection so the download fails as well as the install next.

  • Anonymous
    December 18, 2012
    Hi Ken Alverson - Do you know what is triggering the internet connection in this scenario?  Did you have all of the required setup files staged along with the setup.exe? Can you please use the tool described at blogs.msdn.com/.../6458047.aspx to collect all of your setup log files, upload the file named %temp%vslogs.cab that this tool will create to a file server (such as http://skydrive.live.com), and then reply back here and provide a link that I can use to download your log files and take a look to see if I can figure out what is causing the internet connection in your scenario?

  • Anonymous
    December 18, 2012
    skydrive.live.com

  • Anonymous
    December 18, 2012
    Hi Ken Alverson - The link isn't working for me.  When I tried to visit your site, it says "This item might have been deleted, expired, or you might not have permission to access it. Contact the owner of this item for more information." Can you please check the sharing permissions?

  • Anonymous
    December 18, 2012
    You do need to be logon first with a Microsoft account before accessing the link.  Can you try that?  Alternately, I can put the file on our public ftp server and provide you with a user/pass for the connection.

  • Anonymous
    December 18, 2012
    Try this link instead <iframe src="skydrive.live.com/embed width="98" height="120" frameborder="0" scrolling="no"></iframe>

  • Anonymous
    December 18, 2012
    Hi Ken Alverson - Sorry, I missed that detail from your earlier reply that you're trying to install on Windows 8.  You cannot install the .NET Framework 3.5 redistributable on Windows 8.  There is an install-on-demand feature that you have to use to install the .NET Framework 3.5, and that feature will also install the .NET Framework 2.0 and 3.0 behind the scenes. You can see more information about this install-on-demand feature in the MSDN documentation at msdn.microsoft.com/.../hh506443.aspx.

  • Anonymous
    December 18, 2012
    Aaron, thank you so much for your help.  From you reply, it looks like there is no way to get around having to have an internet connection to enable feature NetFx3.  I did see a way of enabling feature NetFx3 from Dsim, but that requires a mounted Windows OS DVD from the customer to be present before the install begins.  

  • Anonymous
    December 18, 2012
    Hi Ken Alverson - My understanding is that Windows 8 would need to have access to the original OS installation disc or the original OS installation path (on a network share for example) to be able to enable the .NET Framework 2.0, 3.0 and 3.5.  It might be possible to stage the original OS installation disc so that Windows 8 wouldn't require network access, but that is something the customer would need to do for themselves.  The customer could also deploy Windows 8 with the .NET Framework 2.0, 3.0 and 3.5 pre-enabled.

  • Anonymous
    October 26, 2013
    The comment has been removed

  • Anonymous
    October 28, 2013
    Hi Lucy - The prompt you're seeing means that the .NET Framework 3.5 is included as a part of the OS on the version of Windows that you have on your computer.  The .NET Framework 3.5 is included with Windows 7, Windows 8, Windows 8.1, and Windows Server 2012.  On all of those versions of Windows, you cannot use the redistributable installer (dotnet35.exe) to install the .NET Framework 3.5.  Instead, you need to use the Windows Features control panel. Visual Studio 2012 requires the .NET Framework 4.5, not the .NET Framework 3.5.  If it isn't yet installed on your computer, VS 2012 setup will install the .NET Framework 4.5 for you automatically.

  • Anonymous
    July 11, 2014
    The comment has been removed

  • Anonymous
    July 12, 2014
    Hi Anthony - That message means that the application you're trying to run requires the .NET Framework 4.  You can download the .NET Framework 4 from www.microsoft.com/.../details.aspx.

  • Anonymous
    February 23, 2017
    I have tried several times to run >Net Framework 3.5 setup and the other exe file and both end with a failure to connect error message.I will try the steps you have outlined

  • Anonymous
    February 26, 2017
    I tried all those /x, setup this, exe that and none of them worked. It took hours of researching and trying failed fixes. I came across this and it worked. Two security updates interfere with 3.5 installation. Download a file, run it and then the full dotnetfx35.exe file worked for me.This update resolves an issue that prevents the optional Microsoft .NET Framework 3.5 feature from being enabled after you install security update 2966827 or 2966828 (described in Microsoft Security Bulletin MS14-046) for the Microsoft .NET Framework 3.5. This update applies to Windows 8, Windows Server 2012, Windows 8.1, and Windows Server 2012 R2. Summary Microsoft has released update 3005628 for the .NET Framework 3.5 on Windows 8, Windows Server 2012, Windows 8.1, and Windows Server 2012 R2.