I have been using Windows 8 for last few months. When Windows 8 CP released I installed CP & subsequently RP too. When I wanted to install some 3rd party application in my Windows 8 VM, I realized that these applications require .NET Framework 2.0 or 3.0 in few cases. Apparently my virtual machine does not have internet connection. Obviously the first step for us is to check the Program and Features to enable any available additional features in an Operating System. This is what you see in your Control Panel –> Program and Features. Click on Turn Windows features on or off.
Here you can see .NET Framework as a feature and by default the feature is disabled. You can enable this particular right away using this GUI Tool but in order to do that you need to be connected to internet i.e. Online Mode. Other way is using DISM Command and this can be done in an Offline Mode using Windows 8 installation media. Let’s see these 2 methods.
Method 1: When you are Online, connected to Internet.
In order to install the following window click on the .NET Framework 3.5 (included .NET 2.0 and 3.0) select it & click OK
Now, it will download the entire package from the internet & install the .NET Framework feature.
Method 2: When you are Offline and not connected to Internet
If you open CMD.EXE with Administrative Privileges i.e. at elevated level & run the this DISM command dism /online /get-features you will see that from the State that .NET Framework is not part of the Operating System.
So the first thing you need to do is to copy the required package to local machine before you run the command to install .NET Framework. To do that use Windows 8 ISO/DVD/USB Media. You need to copy SXS folder to local machine located at D:\sources\sxs (In this case D: your drive letter on which you have loaded Windows 8 Media)
You can also use the following command to copy this folder locally. xcopy d:\sxs\*.* c:\sxs /s
Once completed, in order to install this feature you can run the following command dism /online /enable-feature /featurename:NetFx3 /All /Source:C:\sxs /LimitAccess and hit Enter
After completing the installation of .NET Framework 3.5 you can see that the feature is enabled in the Control Panel –> Program and Features
Bingo. Now you can enable .NET Framework feature on Windows 8 without needing of an internet connection.
Update: There was a small typo in the command, I missed including : between source:C:\. I did fix it. Thank you all for your comments & pointing that out