The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Azure Virtual Machines!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

How do I enable the .NET Framework 3.5 on an Azure VM created from a Windows Server 2012 R2 image? RRS feed

  • Question

  • I have a new Azure VM (the Visual Studio Professional 14 CTP 2 Windows Server 2012 R2 image) and I'm trying to install SQL Server on it. The installation fails because it cannot see the .NET Framework 3.5 installed. There are two ways I know of to fix this, one is to run

    DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:"D:\sxs"

    from an elevated command prompt and one is to enable the feature in the Add Roles and Features Wizard.

    In each case I need the location of the source files. I think this would usually be on one's installation disk but since I'm on an Azure VM there is no installation disk. What should I use as the source path? How do I enable the .NET Framework 3.5 on an Azure VM created from a Windows Server 2012 R2 image?

    Monday, July 28, 2014 4:28 PM


All replies

  • Fixed - ignore the warnings asking for a source location and just click "install"!
    Monday, July 28, 2014 4:52 PM
  • Hi,

    Glad the issue was solved.

    More information:

    To install Microsoft .NET Framework 3.5 on Windows Server 2012

    1. Establish a Remote Desktop Connection to the Windows Azure virtual machine.

      From the Windows Azure Management Portal, under Virtual Machines, choose the virtual machine from the list, and then choose Connect.

    2. Run Windows PowerShell as an Administrator.

           At the command prompt, type the following command and press Enter.

           Add-WindowsFeature NET-Framework-Core


    Vivian Wang

    Tuesday, July 29, 2014 2:23 AM
  • Not work for me.
    Friday, September 12, 2014 2:07 PM
  • Neither of these solutions works for me. Keep getting the same answer everywhere and it doesn't work. Neither the Powershell option or the regular option described above. 

    PS C:\Users\solanna> Add-WindowsFeature NET-Framework-Core
    Add-WindowsFeature : The request to add or remove features on the specified server failed.
    Installation of one or more roles, role services, or features failed.
    The source files could not be downloaded.
    Use the "source" option to specify the location of the files that are required to restore the feature. For more
    information on specifying a source location, see Error: 0x800f0906
    At line:1 char:1
    + Add-WindowsFeature NET-Framework-Core
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeatur
        + FullyQualifiedErrorId : DISMAPI_Error__Cbs_Download_Failure,Microsoft.Windows.ServerManager.Commands.AddWindo

    Success Restart Needed Exit Code      Feature Result
    ------- -------------- ---------      --------------
    False   No             Failed         {}

    Wednesday, September 24, 2014 3:08 AM
  • As above I also still get this error. I opened a new question about my specific use case but it should apply to all trying to do this. Cannot get .NET 3.5 to install with any of the suggestions above.
    Wednesday, October 8, 2014 12:12 AM
  • This worked for me!


    Friday, July 31, 2015 5:50 PM
  • Did this works for you? I tried on Windows Server 2016 but it is failing

    I tried with DISM as well and no luck

    Did it solved for you??

    Thursday, August 3, 2017 10:58 AM
  • For specialized assistance, you may create separate forum thread here:


    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community member

    Monday, August 7, 2017 9:31 AM
  • Using DISM did not work for me. Neither did just ignoring the alternative path warning.

     I get the following output:


    Deployment Image Servicing and Management tool Version: 6.3.9600.17031 Image Version: 6.3.9600.17031 Enabling feature(s) [===========================66.2%====== ] Error: 0x800f081f The source files could not be found. Use the "Source" option to specify the location of the files that are required t o restore the feature. For more information on specifying a source location, see The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

    I think I it is pretty ridiculous that it is THIS hard to enable features (that IMO should be enabled by default - .net 3.5). Did MS not contemplate that users might want/need to enabled features on VMs in azure?

    • Edited by UpYourGame Tuesday, October 31, 2017 4:17 PM
    Tuesday, October 31, 2017 4:16 PM
  • After trying every suggestion I found on the web, I finally figured out a solution that worked for me.

    A simple GPO will do the trick.
    To verify in your scenario, run gpedit.msc & then browse to:
    Local Computer Policy>Computer Configuration>Administrative Templates>System>

    Find the setting titled: Specify settings for optional component installation and component repair

    Enable the setting & check the box to "Contact Windows Update directly to download repair content in stead of Windows Server  Update Services (WUSUS)

    I tried this once & it didn't work, but after changing the setting & a quick reboot, I FINALLY was able to implement my features.

    • Proposed as answer by Santi Calvo Tuesday, June 11, 2019 3:05 PM
    Saturday, February 24, 2018 3:50 PM
  • This worked for me. Thanks for solution.
    Wednesday, August 1, 2018 7:27 PM
  • Hi,

    Ignoring also worked for me. I had just gone through the process of turning off IE Enhanced Security Configuration in server manager. I had be unable to download anything and am going to assume it is related.



    Friday, December 14, 2018 12:25 AM
  • It worked for me.

    Lots of thanks !

    Santi Calvo Company.

    Tuesday, June 11, 2019 3:05 PM