How to Offline Install .NET Framework 3.5 in Windows 11 with DISM

This post will show you how to install .NET Framework 3.5 in Windows 11 offline from an installation media with DISM. By default, Windows 11 only includes .NET Framework 4.8. However, there are still a huge number of useful apps built against the .NET framework v3.5.

Such apps were created for Windows 7 and even for Windows Vista, where version 3.5 was available out of the box. Once you try to run such an app, you will see a prompt to install the missing component from the Internet.

This method has a number of disadvantages. First of all, it is your Internet traffic, and it can be limited. Secondly, the download process is not reliable and can fail. If your Internet connection is unstable, it turns into hell. Finally, you can simply work offline.

That’s why it is important to know how to offline install .NET Framework 3.5 in Windows 11. You will only need an installation media of Windows 11, such as ISO file, bootable flash drive, or its DVD disk, so no Internet connection will be required.

To offline install .NET Framework 3.5 in Windows 11, do the following.

Install .NET Framework 3.5 in Windows 11 Offline

  1. Double click the Windows 11 ISO image, or plug your bootable flash drive or insert DVD disk with Windows 11.
  2. Open File Explorer (press Win + E ) and navigate to the This PC folder. Note the drive letter of your installation media have inserted. My drive is G: .
  3. Now open Windows Terminal as Administrator by selecting Windows Terminal (Admin) from the Start button’s right-click menu.
  4. Switch Windows Terminal to the Command Prompt profile; press Ctrl + Shift + 2 or the arrow menu button.
  5. In the command prompt tab, type the following command: Dism /online /enable-feature /featurename:NetFX3 /All /Source:G:\sources\sxs /LimitAccess . Replace G: with your Windows 11 setup media’s drive letter and hit Enter .

You are good to go! This will install .NET framework 3.5 in Windows 11 without using any Internet connection.

Now you can run any older apps coded in C#, VB.NET, and C++ that are built around older versions of the software platform. Note that .NET Framework 3.5 also includes .NET 2.0, which is also the runtime version.

Using a batch file

To save your time, I have created an easy-to-use simple batch file which automates the above method. It will automatically find your Windows 11 installation DVD disk or USB drive.

To install .NET Framework 3.5 on Windows 11 with a batch file, do the following.

  1. Download this ZIP file.
  2. Extract the CMD file it from the ZIP archive to the Desktop.
  3. Connect or insert your Windows 11 installation disk.
  4. Now, right-click the cmd file and select Run as administrator from the menu.
  5. The cmd file will auto-detect Windows 11 setup disk and instantly add .NET Framework 3.5 automatically.

You are done. The file is compatible with both install.wim and install.esd – based setup media types of Windows 11, so you can use any! The official one comes with install.esd by default.

Batch file contents

The contents of the batch file are listed below.

@echo off Title .NET Framework 3.5 Offline Installer for %%I in (D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist "%%I:\\sources\boot.wim" set setupdrv=%%I if defined setupdrv ( echo Found drive %setupdrv% echo Installing .NET Framework 3.5. Dism /online /enable-feature /featurename:NetFX3 /All /Source:%setupdrv%:\sources\sxs /LimitAccess echo. echo .NET Framework 3.5 should be installed echo. ) else ( echo No installation media found! echo Insert DVD or USB flash drive and run this file once again. echo. ) pause

Tip : You can easily find what versions of the .NET framework software you have installed using the following guide. It will give you ideas what apps will work on your computer without installing additional system components.

Finally, if you don’t have the installation media for Windows 11, and also have no troubles with the Internet, you can give the online .NET Framework installation a try. Since we have already mentioned it in the post, let’s review it for the sake of completeness.

Install .NET Framework 3.5 with Optional Features

  1. Press Win + R to open the Run box and type optionalfeatures .
  2. In the Windows Features window, select the .NET Framework 3.5 (includes .NET 2.0 and 3.0) entry.
  3. Enable it by placing a check box and click on the OK button.
  4. Wait for Windows 11 to download and install the components.

You are done. So, as you can see, it is an optional component of Windows, so you can manage it like any other optional feature. Microsoft also recommends using this method by default.

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won’t take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube. View all posts by Sergey Tkachenko

Author Sergey Tkachenko Last updated on: Last updated on: October 28, 2021 Categories Windows 11 Tags .net 3.5 offline install, .net framework

4 thoughts on “How to Offline Install .NET Framework 3.5 in Windows 11 with DISM”

Add option to iso context menu:
@echo off
explorer “%1”
Title .NET Framework 3.5 Offline Installer
for %%I in (D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist “%%I:\\sources\boot.wim” set setupdrv=%%I
if defined setupdrv (
echo Found drive %setupdrv%
echo Installing .NET Framework 3.5…
Dism /online /enable-feature /featurename:NetFX3 /All /Source:%setupdrv%:\sources\sxs /LimitAccess
echo.
echo .NET Framework 3.5 should be installed
echo.
) else (
echo No installation media found!
echo Insert DVD or USB flash drive and run this file once again.
echo.
)
pause Copy .bat file to folder C:\Windows\System32\ShellExt And registry item to iso context menu:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Windows.IsoFile\shell\Install DotnNet3] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Windows.IsoFile\shell\Install DotnNet3\command]
@=”\”C:\\Windows\\System32\\ShellExt\\Install .NET Framework 3.5 via DISM.cmd\” \”%1\””

thanks for the info i think you are taking a long root, no use to open terminal window. u just have to open the cmd with admin elevation then copy the below command and change the path for OS then hit enter. Its similar to windows 10 Dism /online /enable-feature /featurename:NetFX3 /All /Source:G:\sources\sxs /LimitAccess.

Leave a Reply Cancel reply

Connect with us

Here you can subscribe to our channels. We have Twittеr, YouTube, and Telegram, along with an RSS feed and Email newsletter.

We discontinued Facebook to deliver our post updates.

Featured posts

  • Disable ads in Windows 11
  • Disable Defender in Windows 11
  • Disable SmartScreen in Windows 11
  • Disable web links in Search in Windows 11
  • Download Windows 11 ISO file for any build or version
  • Generic keys for Windows 11 (all editions)
  • Install Windows 11 with a local account
  • URI commands for Windows 11 apps
  • Windows 10 release history
  • Windows 11 ms-settings commands
  • Windows 11 Release history

Αdvertisement

Friendly Blogs

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies. Read More

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.

Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.

How to Install .NET Framework 3.5 on Windows 11/10 and Windows Server

Most modern Windows apps require the .NET Framework to be installed. For example, NET Framework 4.8 is installed by default on Windows 11/10 and Windows Server 2022/2019. However, some old and legacy applications require the .NET Framework 3.5, 2.0, or even 1.0 to be installed.

In this article, we’ll walk you through how to install .NET 3.5 on Windows 11/10/8.1 and Windows Server 2022/2019/2016/2012R2.

Installing .NET Framework 3.5 on Windows 11 and 10

Check that .NET Framework 3.5 (includes .NET 2.0 and 3.0) is not installed on your computer. Open a PowerShell console as an administrator and run the command:

Get-WindowsCapability -Online -Name NetFx3

In our case, .NET 3.5 is not installed ( State=NotPresent ).

On Windows 10/11, you can install the .Net Framework from the Turn Windows Features on or off panel:

  1. Run the command optionalfeatures.exe ;
  2. Select .NET Framework 3.5 (includes .NET 2.0 and 3.0) in the list of components, click OK;
  3. If your computer has direct Internet access, select “Let Windows Update download the files for you”;
  4. Windows will download and install the latest version of the .NET Framework 3.5 component from the Microsoft Update servers.
  • Using DISM: DISM /online /Enable-Feature /FeatureName:”NetFx3″
  • Or with PowerShell: Enable-WindowsOptionalFeature -Online -FeatureName “NetFx3”

If your computer is not connected to the Internet or disconnected from the network, then an error will appear when installing .NET 3.5:

Windows couldn’t complete the requested changes. The changes couldn’t be completed. Please reboot your computer and try again Error code: 0x8024402C

In this case, you can manually install the NET 3.5 feature from your Windows installation media. To do this, you will need an installation USB flash drive or an ISO image file with your Windows version (how to check the version of Windows in an ISO image):

  1. Connect your media with the Windows installation image to your computer. In my case, I have the file Windows 11 ISO image file. Click on the file and choose Mount to connect the image to a virtual DVD drive (or use the PowerShell command: Mount-DiskImage -ImagePath “C:\ISO\Windows11-22h2.iso” );
  2. In my case, the virtual drive with the image was assigned the drive letter E: (we will use this drive letter in the following commands);
  3. To install .Net 3.5 from the component source files on the installation disk, use the command:
    DISM /online /enable-feature /featurename:NetFX3 /All /Source:E:\sources\sxs /LimitAccess
    Or (a similar PowerShell command):
    Add-WindowsCapability -Online -Name NetFx3~~~~ -Source E:\Sources\SxS

To make sure that the .NET Framework is successfully installed, run the command:

Get-WindowsCapability -Online -Name NetFx3~~~~

Name : NetFX3~~~~ State : Installed DisplayName : .NET Framework 3.5 (includes .NET 2.0 and 3.0) Description : .NET Framework 3.5 (includes .NET 2.0 and 3.0) DownloadSize : 72822163 InstallSize : 496836410

Get-ChildItem ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP’ -Recurse | Get-ItemProperty -Name version -EA 0 | Where < $_.PSChildName -Match ‘^(?!S)\p’> | Select PSChildName, version

How to Install .NET Framework 3.5 on Windows Server 2022/2019/2016?

On Windows Server 2022, 2019, 2016, and 2012 R2, you can install NET Framework 3.5 in several ways:

  • Via Server Manager: Add roles and features -> Features -> .NET Framework 3.5 Features -> .NET Framework 3.5 (includes .NET 2.0 and 3.0 );
  • Using DISM: DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
  • With PowerShell: Install-WindowsFeature NET-Framework-Core

In this case, all the necessary .NET 3.5 installation files for your Windows Server version will be downloaded from the Windows Update servers. For this installation method to work, you need to check the following:

  1. Your Windows Server must have direct Internet access. Proxy and firewall settings should not restrict access to Windows Update servers;
  2. Your host must not be configured to receive updates from the local WSUS server. Check your current Windows Update settings using the Group Policy result report ( rsop.msc ) or directly in the registry;

Check the value of the UseWUServer parameter in the registry:
Get-ItemProperty -Path “HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU” -Name “UseWUServer” | select -ExpandProperty UseWUServer
If the parameter value is 1 , then your host is configured to receive Windows updates from the local WSUS server. In this case, you will receive error 0x800F0954 when installing .NET 3.5. Change the registry parameter to 0 or remove it to connect directly to the Microsoft Windows Update servers.

If you can access the Internet from your Windows Server host, but it is configured to receive updates from WSUS, you will see error 0x800f081f when installing NET Framework.

Solution: Install .Net 3.5 online from Microsoft servers and ignore local WSUS:

  1. Export the current Windows Update settings from the HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate registry key to a REG file:
    reg export HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate c:\WindowsUpdateRegFile.reg
  2. Delete this key ( Remove-Item -Path HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate -Recurse ) and restart the service: net stop wuauserv & net start wuauserv
  3. Run the .Net 3.5 installation from the web: DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
  4. After the installation is complete, return the previous WU settings: import the reg file ( Reg import c:\WindowsUpdateRegFile.reg ) and restart the Windows Update service again

If there is no direct Internet access from the server, then when you try to install .NET 3.5 on Windows Server through the Server Manager, you will receive the error 0x800F081F (The source files could not be found), 0x800F0950, 0x8024402c, 0x800F0906, or 0x800F0907 (depending on the version of Windows Server).

Although .NET Framework 3.5 is listed as a feature of Windows Server 2022/2019/2016/2012R2, its binary files are missing from the Windows component store (Features on Demand concept). This is done to reduce the size of the operating system image on the disk. You can check if the .NET Framework 3.5 source files are available in the local component store of Windows Server with the command:

As you can see the status of the NET-Framework-Core feature is Removed.

In order to install the NET-Framework-Core, you will need a distribution with your version of Windows Server in the form of an ISO file, or in the extracted form in a network folder. Mount the ISO file with the Windows Server install image as a virtual drive (for example, drive D:). Now, you can install the Windows features from the GUI or using PowerShell.

You can install the .Net 3.5 feature from the Server Manager graphical console:

  1. Select the .Net Framework 3.5 feature as earlier, but prior to clicking Install, click a small link Specify an alternate source path at the bottom of the form;
  2. Specify the path to the Component Store (SXS) folder in your Windows Server distro. If you mounted the ISO image as a virtual disk, the path may look like D:\sources\sxs . It can also be a network share, where you copied the distribution files (for example, \\fs1\iso\ws2016\sources\sxs ). Then click OK.

It is much easier to install .NET Framework 3.5 feature from the elevated command prompt or PowerShell console. Just run the command:

Dism.exe /online /enable-feature /featurename:NetFX3 /All /Source:D:\sources\sxs /LimitAccess

The LimitAccess parameter prevents DISM from connecting to Windows Update servers to receive feature binary files. Only source files in the specified folder are used.

If you want to install the Windows Server feature using PowerShell, use the Add-WindowsFeature command:

Add-WindowsFeature NET-Framework-Core -Source d:\sources\sxs

After the component installation is completed, a server restart is not required.

You can also manually copy 2 CAB files microsoft-windows-netfx3. from the \sources\sxs folder of your Windows Server install image. In this case, to install .NET 3.5, just run the command:

dism /online /Add-Package /PackagePath:C:\distrib\net35\microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab.

Configure .Net Framework Offline Installation Options with GPO

You can configure specific settings for installing Windows components from a local source or Windows Update even when using WSUS with the Group Policy option Specify settings for optional component installation and component repair (located under GPO section Computer Configuration -> Administrative Templates -> System).

On a standalone computer, you can enable this policy setting using the Local Group Policy Editor ( gpedit.msc ). In an Active Directory environment, you can create a GPO for all computers/servers using the GPMC console ( gpmc.msc ).

Here you can specify that when installing or repairing Windows components, you should always download files from the Windows Update servers (Internet) instead of the local WSUS server (the “Download repair content and optional features directly from Windows Update instead of Windows Server Update Services” option).

You can also specify the path to the shared folder with Windows Server components that you want to use for offline installation in the “Alternate source file path” parameter:

  • Specify the path to network shared folder in the UNC format ( \\fs01\distr\ws22\sxs ) (here you can specify multiple UNC paths separated by semicolons: \\fs01\ws22\sxs;\\man02\ws22\sxs;\\fs03\sxs )
  • It is also possible to specify a WIM file as a source: WIM:\\fso1\distr\ws16\install.wim:2 (in this case, 2 is the index of your edition of Windows Server’s image in the WIM file. You can list available Windows Server edition in a WIM file with a command: DISM /Get-WimInfo /WimFile:”\\server\distr\ws2016\install.wim” )

Use the different SXS sources for different versions of Windows Server. If you are running multiple versions of Windows Server on your network, you will need to create separate GPOs with different UNC paths to SXS sources. You can use Group Policy WMI filters to apply a GPO only to hosts that are running specific versions of Windows Server.