Categories
.NET Personal Productivity Setup Utility

How to install .NET Framework 2.0 and 3.5 on Windows 8 in Offline Mode

I have installed Windows 8 few days back. And during some initial programs setup I noticed that Windows 8 does not include .NET 3.5 (include .NET 2.0 and 3.0) by default. However it did contained the setup in the OS disc.

So question is, How to install the .NET framework 3.5 including .NET 2.0 and 3.0 ?

Solution is answered as below.

I had found my solution on Microsoft support ? here.

This an Re-post of the same with corrections.

Steps below shows how we can install /enable the .NET Framework 3.5 (include .NET 2.0 and 3.0) feature in offline mode i.e. without using internet:

Step 1: Insert Windows 8 DVD or mount ISO image. The source of this feature can be found in folder E:\sources\sxs (In this case E: drive letter will be on which Windows 8 Media is located).

Windows 8 Media folder view
Windows 8 Media folder view

Step 2: Open cmd.exe (Command Prompt) with Administrative Privileges.

Step 3: Run the following command

dism.exe /online /enable-feature /featurename:NetFx3 /All /Source:"E:\sources\sxs" /LimitAccess

and then hit Enter.

Command Prompt showing installation of the feature.
Command Prompt shows installation of the feature completed.

 

Finish: After completing the installation of .NET Framework 3.5 you can see that the feature is enabled as shown in the screenshot below.

Windows features showing installed .NET 3.5
Windows features displays .NET 3.5 installed.

 

Categories
.NET Setup

Installing .NET 3.5 service pack 1 along with application setup

Many of us would have been creating setups for applications either using WinForms or WPF and other such, but we really ignore the fact that users might not have all the prerequisites that our application requires to work.

Possibilities for that might be one or more as below:

  1. User do have .NET framework even installed.
  2. Users .NET framework installation is older or newer but not the required one.
  3. For example, user have .NET framework version 3.5 but not 3.5 SP1
  4. You have disabled to check .NET framework exists before application installs so application will not start all after installation, so users frusts and uninstalls your application.
  5. You have enabled to check and install .NET framework along with your application online, but you have ignored the fact that user might have no internet access on their system.
So what could we do for this ?
Solution is to include the .NET framework standalone setup installation in your application setup.
And steps to install the .NET framework 3.5 with the application are as follows:

Step 1 – Download the combined installation package for the .NET Framework 3.5 from Microsoft download site dotnetfx35.exe.
Folder view

 

Step 2 – After downloading this package, you have to extract the contents by running dotnetfx35.exe /x and it will prompt you with a location to extract the contents to a path.

Command prompt

 

Step 3 – Copy the contents of files and folder from {extracted path}\WCU\dotNetFramework to C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\DotNetFX35SP1
please note that to change ‘Program Files’ to ‘Program Files (x86)’ in above path if working on 64-bit system.

 

Step 4 – If you wish to get rid of the build warnings, you can update your PublicKey in the Product.XML with the following value: 3082010A0282010100A2DB0A8DCFC2C1499BCDAA3A34AD23596BDB6CBE2122B794C8EAAEBFC6D526C232118BBCDA5D2CFB36561E152BAE8F0DDD14A36E284C7F163F41AC8D40B146880DD98194AD9706D05744765CEAF1FC0EE27F74A333CB74E5EFE361A17E03B745FFD53E12D5B0CA5E0DD07BF2B7130DFC606A2885758CB7ADBC85E817B490BEF516B6625DED11DF3AEE215B8BAF8073C345E3958977609BE7AD77C1378D33142F13DB62C9AE1AA94F9867ADD420393071E08D6746E2C61CF40D5074412FE805246A216B49B092C4B239C742A56D5C184AAB8FD78E833E780A47D8A4B28423C3E2F27B66B14A74BD26414B9C6114604E30C882F3D00B707CEE554D77D2085576810203010001
Use this for both of the XPSEPSC* files.
Product.xml is located in ‘DotNetFX35SP1’ directory itself

 

Step 5 – In Visual Studio 2010, right-click on Setup project > Properties -> Prerequisites -> Select .NET Framework 3.5 SP1 > Below select the option “Download the prerequisites from the same location as my application” > Save changes

 

Step 6 – And last step is to rebuild the setup project and Test.

 

Reference links: