Include .Net Framework 3.5 SP1 to your installation package in Visual Studio

VS 2008 Prerequisites

Recently, after you create your application (web or windows app) in VS .Net 2008 / 2010 of course you create your setup project / click once deployment for better distribution of your application. But we will found a problem if we want to include .Net Framework 3.5 SP1 as our prerequisites in the same directory as the application. You will found error message like this one : “The install location for prerequisites has not been set to ‘component vendor’s web site’ and the file ‘DotNetFX35SP1\dotNetFX20\netfx20a_x86.msi’ in item ‘.NET Framework 3.5 SP1‘ can not be located on disk.”. Well, it’s because by default, .Net Framework 3.5 SP1 will be download from Microsoft Download Center website due to size restrictions.

The question is, how we include .Net Framework 3.5 SP1 in our installation package? well, Microsoft has provided way to doing this. You can find the full instruction in Visual Studio 2008 Service Pack 1 Readme.

I will try to provide tutorial based on VS 2008 SP1 Readme file. Here’s the step :

  1. Download .Net Framework 3.5 SP1 from Microsoft Download Center.
  2. Open command prompt and navigate to your downloaded .Net Framework path. For example : C:\dotNetFx35.exe
  3. At the command prompt, type dotNetFx35.exe /X: this will extracted Framework files to a folder named WCU in your current directory.
  4. Open

    C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages

    for x86 os

    C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages

    for x64 OS.

  5. Edit the product.xml with notepad or other text editor tool.
  6. Paste this following into <PackageFiles> element :

    <PackageFile Name=”TOOLS\clwireg.exe”/>
    <PackageFile Name=”TOOLS\clwireg_x64.exe”/>
    <PackageFile Name=”TOOLS\clwireg_ia64.exe”/>

  7. Find the element for <PackageFile Name=”dotNetFX30\XPSEPSC-x86-en-US.exe” and change the PublicKey value to:


  8. Find the element for <PackageFile Name=”dotNetFX30\XPSEPSC-amd64-en-US.exe” and change the PublicKey value to the same as in step 7 above.
  9. save the product.xml.
  10. Open your extracted dotNetFx35.exe files, and copy all of contents in  C:\wcu\dotNetFramework to folder in step 4.

Note : For VS 2010, you just go to this folder 

C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages

for x86 OS and 

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages

for x64 OS. Rest of it is the same.

That’s it. Now you can include .Net Framework 3.5 SP1 in your installation package.

One thought on “Include .Net Framework 3.5 SP1 to your installation package in Visual Studio

  1. Funcionó, la clave para que el instalador arrastre los prerequisitos crystal reports, esta en copiar el instalador en la carpeta C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s