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.

  • c:\User\kalverson\Desktop\layout\wcu\dotNetFramework\>dotNetFx35setup.exe /x

    c:\Users\kalverson\Desktop\layout\wcu\dotNetFramework>dir /s setup.exe

    Volume in drive C is Hard Drive

    Volume Serial Number is )ABC-084

    Fle Not Found

    c:\Users\kalverson\Desktop\layout\wcu\dotNetFramework>

  • 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.

  • 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.

  • 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?

  • skydrive.live.com

  • 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?

  • 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.

  • Try this link instead

    <iframe src="skydrive.live.com/embed width="98" height="120" frameborder="0" scrolling="no"></iframe>

  • 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.

  • 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.  

  • 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.

  • Hi, i'm unable to installed with the above procedures u mentioned.

    Whenever i run setup.exe after extracting dotnet35.exe , it prompts me to enable .net 3.5 "Turn windows features on or off" but when i check the box and click ok it automatically tries to connect to the internet. I've already installed VISUAL STUDIO 2012 for DESKTOP n VISUAL STUDIO 2012 Web Express. I think both of them requires .net 3.5 3.0 2.0. Please help me .Thanks in advance.

  • 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.

  • morning iv down loade,d the rats online cheat tool box, every time i go two connect or start it it comes up with this... netframework initialization error to run this program you must install 1 of the following versions of the .net frame work:v4,0,30319 what dose it mean help plzzzzzz thank you ?????????

  • 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.

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