[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 Addicted

    Joined:
    Jun 9, 2015
    Messages:
    509
    Likes Received:
    129
    Trophy Points:
    30
    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 Addicted

    Joined:
    Jun 9, 2015
    Messages:
    509
    Likes Received:
    129
    Trophy Points:
    30
    #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

    Joined:
    Feb 19, 2011
    Messages:
    12,067
    Likes Received:
    55,424
    Trophy Points:
    340
    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 Addicted

    Joined:
    Jun 9, 2015
    Messages:
    509
    Likes Received:
    129
    Trophy Points:
    30
    Well, I'm screwed.
    So they cannot be added via dism /online /add-capability too?
    MS as usual?
     
  5. Enthousiast

    Enthousiast MDL Tester

    Joined:
    Oct 30, 2009
    Messages:
    35,566
    Likes Received:
    59,629
    Trophy Points:
    450
    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 Addicted

    Joined:
    Jun 9, 2015
    Messages:
    509
    Likes Received:
    129
    Trophy Points:
    30
    Yep, that's my job to blame Microsoft for all the mess they doing with operational system.
     
  7. Enthousiast

    Enthousiast MDL Tester

    Joined:
    Oct 30, 2009
    Messages:
    35,566
    Likes Received:
    59,629
    Trophy Points:
    450
    Your job is to blame msft for your faults? ;):D:D
     
  8. MrChris

    MrChris MDL Addicted

    Joined:
    Jun 23, 2007
    Messages:
    515
    Likes Received:
    120
    Trophy Points:
    30
    <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

    Joined:
    Feb 19, 2011
    Messages:
    12,067
    Likes Received:
    55,424
    Trophy Points:
    340
    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 Addicted

    Joined:
    Jun 9, 2015
    Messages:
    509
    Likes Received:
    129
    Trophy Points:
    30
    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.
     
  11. Stanzilla

    Stanzilla MDL Novice

    Joined:
    Mar 7, 2014
    Messages:
    30
    Likes Received:
    15
    Trophy Points:
    0