[Solved] How to re-enable built-in .NET Framework 4.7.2 in Windows 10?

Discussion in 'Windows 10' started by Full inu, Jul 4, 2018.

  1. Full inu

    Full inu MDL Senior Member

    Jun 9, 2015
    486
    121
    10
    Looks like if you disable those features via dism /online /disable-feature, then your .NET will be screwed without possibility to enable it again via DISM. Or maybe I am wrong?

    Microsoft-Windows-NetFx3-OC-Package
    Microsoft-Windows-NetFx4-US-OC-Package
    Microsoft-Windows-NetFx3-WCF-OC-Package
    Microsoft-Windows-NetFx4-WCF-US-OC-Package

    Welp, I accidentally disabled those and now my 3rd party firewall app won't start.
     
  2. Full inu

    Full inu MDL Senior Member

    Jun 9, 2015
    486
    121
    10
    #3 Full inu, Jul 4, 2018
    Last edited: Jul 4, 2018
    (OP)
    Setup not working on Windows 1803 version.

    Edit: In c:\Windows\WinSxS folder several houndreds of folders related to .net were simply removed from disk. Just like when we disable nextfx3 in W10 - they were removed physically too, except that fact that .NET 4.7.2 pretends to be a part of OS.
    Maybe there is an option to restore all files by mounting install.wim ?
    Something like this:
    dism /online /enable-feature /featurename:Microsoft-Windows-NetFx3-OC-Package /source:C:\mount\windows\winsxs ?
     
  3. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    7,816
    25,483
    240
    Long explanation
    since Windows 7, some OS features are part of the edition package itself, not like other "normal" features which are part of the Windows Foundation package and reflected in "Turn Windows features on or off"

    those can be checked/seen by specifying the edition name with the /Get-Features command
    i.e. for Windows 10 Pro ver 1507 x86
    Code:
    Dism /Online /Get-Features /PackageName:Microsoft-Windows-ProfessionalEdition~31bf3856ad364e35~x86~~10.0.10240.16384 /Format:Table
    
    ----------------------------------------------------- | --------
    Feature Name                                          | State
    ----------------------------------------------------- | --------
    Microsoft-Hyper-V-ClientEdition-Package               | Enabled
    Microsoft-Hyper-V-Common-Drivers-Package              | Enabled
    Microsoft-Hyper-V-Guest-Integration-Drivers-Package   | Enabled
    Microsoft-Windows-Anytime-Upgrade-Package             | Enabled
    Microsoft-Windows-NetFx3-OC-Package                   | Enabled
    Microsoft-Windows-NetFx4-US-OC-Package                | Enabled
    Microsoft-Windows-NetFx3-WCF-OC-Package               | Enabled
    Microsoft-Windows-NetFx4-WCF-US-OC-Package            | Enabled
    Microsoft-Windows-NetFx-VCRedist-Package              | Enabled
    Microsoft-Windows-Printing-PrintToPDFServices-Package | Enabled
    Microsoft-Windows-Printing-XPSServices-Package        | Enabled
    
    disabling any of these edition features actually remove them completely, as specified in .mum file
    Code:
    <selectable disposition="absent">
    they cannot be restored like normal NetFx3 feature with /Source command

    beginning with UUP era in Windows 10 version 1703, those features where moved from edition package to the normal Windows Foundation
    so they would appear with regular /Get-Features command
    but the disabling behavior didn't change, they will be removed "absent" once disabled

    related five years old post :)
    https://forums.mydigitallife.net/posts/810090/

    solution: none
    reinstall :biggrin:
     
  4. Full inu

    Full inu MDL Senior Member

    Jun 9, 2015
    486
    121
    10
    Well, I'm screwed.
    So they cannot be added via dism /online /add-capability too?
    MS as usual?
     
  5. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    16,096
    19,685
    340
    You delete stuff without knowing the consequences and it's "ms as usual" when it can't be undone :thinking:
     
  6. Full inu

    Full inu MDL Senior Member

    Jun 9, 2015
    486
    121
    10
    Yep, that's my job to blame Microsoft for all the mess they doing with operational system.
     
  7. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    16,096
    19,685
    340
    Your job is to blame msft for your faults? ;):D:D
     
  8. MrChris

    MrChris MDL Senior Member

    Jun 23, 2007
    455
    92
    10
    <Sarcasm> When one hacks away at the core inner workings of an operational system, one should expect unexpected and or unstable behavior of ones operational system. ;):D:D </Sarcasm>

    ~MC
     
  9. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    7,816
    25,483
    240
    Actually, MS is blamed for this one :D
    previously, those features was kind of hidden from missing with them accidentally
    but now they are listed with other normal features, without warning of there "special" state

    @Full inu
    the only workaround is to extract the missing packages and add them
    but i doubt SxSExtract.vbs can handle and correctly extract .NET framework
     
  10. Full inu

    Full inu MDL Senior Member

    Jun 9, 2015
    486
    121
    10
    I make it works!

    Here is how: I did an ordinary in-place upgrade. As you know, Windows save state of installed features and if they were disabled/removed, Windows preserved their bad state too...
    (I create this topic after this unsuccessful one...)

    But your information made me think: how Windows handles features that are present only in newer version of Windows? Perhaps they are installed in their default configuration?

    So what I did... Using Notepad++ and disabled UAC on a system level, I have removed information about broken packages in C:\Windows\servicing\Packages from all *.mum-files.
    After this operation all those "removed" features no more listed in "dism /online /get-features".

    After everything was completed and I removed all ~10 broken packages, I made in-place upgrade (upgrade win 1803 to win 1803, using iso).
    After installation finished (took 1 hour), all missed features were restored to their original (e.g. enabled) state.

    This is an my solution.