3

On a Windows Server 2012 R2 Core Server box, I get these results:

PS C:\Users\vagrant> Get-WindowsFeature | Where-Object {$_.DisplayName -like "*.NET*"}

Display Name                                            Name                       Install State
------------                                            ----                       -------------
    [ ] .NET Framework 4.5                              AS-NET-Framework                 Removed
            [ ] .NET Extensibility 3.5                  Web-Net-Ext                    Available
            [ ] .NET Extensibility 4.5                  Web-Net-Ext45                  Available
            [ ] ASP.NET 3.5                             Web-Asp-Net                    Available
            [ ] ASP.NET 4.5                             Web-Asp-Net45                  Available
[ ] .NET Framework 3.5 Features                         NET-Framework-Features         Available
    [ ] .NET Framework 3.5 (includes .NET 2.0 and 3.0)  NET-Framework-Core               Removed
[X] .NET Framework 4.5 Features                         NET-Framework-45-Fea...        Installed
    [X] .NET Framework 4.5                              NET-Framework-45-Core          Installed
    [ ] ASP.NET 4.5                                     NET-Framework-45-ASPNET        Available
    [ ] .NET Environment 3.5                            WAS-NET-Environment            Available

I don't know how to interpret the above report. Is .NET framework 4.5 installed, or not installed? How can ".NET 4.5 features" be "installed", but ".NET 4.5" is "removed"?

The registry entries for .net on this same machine look like this:

enter image description here

Based on the this MSDN article, presumably I have .NET Framework 4.5.1 installed. But still, how should I interpret the first report above? It seems to suggest that my .NET 4.5 install is incomplete.

And it gets worse. Consider this output:

PS C:\Users\vagrant> $psversiontable

Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.33440
BuildVersion                   6.3.9600.16384
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2

This looks like it conflicts with both the reports above. :(

  • did you restarted ? as removed seem to a pending status – yagmoth555 Feb 27 '16 at 23:34
  • @yagmoth555 Restarting the box doesn't change anything; the report remains the same. – Brent Arias Feb 28 '16 at 18:37
  • I guess it's safe to assume that you have .NET 4.5 installed, since your registry says so, and I would interpret the PowerShell output that .NetFramework Features are installed (NET-Framework-45-features) but all ASP.NET Framework features are not installed (AS-Net-Framework). I guess they're only needed on a web server that needs to execute ASP.NET Code. could be wrong, seems plausible though – SimonS Mar 1 '16 at 14:53
1

If you run Get-WindowsFeatures without the filter, you'll see that "AS-Net-Features" is part of "Application Server". As SimonS says, it's only needed if you're hosting applications on that server, not for running .NET-based apps. NET-Framework-Core is the actual .NET framework, which is installed.

$PSVersionTable.PSversion lists the version of PowerShell installed, not the .NET Framework. PowerShell is part of the Windows Management Framework (WMF), each version of which has a dependency of a version of .NET Framework, but they're not like-for-like. For instance, WMF 5 needs .NET 4.5 or above.

As to what version of .NET Framework you have installed, this is an incomplete picture. It tells us that you have .NET 4.5.1 installed (which comes with Windows), which fills any requirement of .NET 4.0 - 4.5.1. It also tells us that you don't have .NET Framework 3.5, which is how you get lower version .NET Framework support as well. However, there have been a few .NET Frameworks released since then (4.5.2, 4.6, and 4.6.1), and if you installed them, they'd be in the installed programs list, not Windows Features.

There is a tool I actually just found recently that can help determine what version is on a given system, although being a GUI program, I'm not sure it'd help on a Server Core install. It's called the .NET Framework Setup Verification Tool, and can be found here: https://blogs.msdn.microsoft.com/astebner/2008/10/13/net-framework-setup-verification-tool-users-guide/

0

.NET 4.5 is installed. Otherwise you would not show a CLRVersion of 4.0.30319.33440, or a PSVersion of 4.0.

Another validation you can perform:

[console]::WriteLine([Environment]::Version)

If you are interested in the "Removed" Install State is and how to restore the payload:

Windows Server 2012 R2 Installation Options and Features on Demand (Part 5 of 5)

"When a feature’s payload is removed from an installation, it is deleted form the side-by-side store at %SystemDrive%:\Windows\WinSxS."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.