.NET Framework Analysis

Looking to create a solid analysis for the .NET framework that deals with the weird issues of 4.5 - 4.6 versions being lumped in with v4.0, older versions, and is hopefully somewhat future proof. I guess that’s hard to predict until Microsoft releases version 5.

Here’s the relevance I have so far, which seems to work well. Most of our devices are running some flavor of v4, so I start off by looking at the CLR version as noted here. If that doesn’t exist, I look at the “maximum” .NET version in the registry that @jgstew has here.

if (exists file "Microsoft.NET\Framework\v4.0.30319\clr.dll" of windows folder) then ((if (version of it > "4.0.30319.0" and version of it <= "4.0.30319.17000") then ("4.0") else if (version of it > "4.0.30319.17000" and version of it <= "4.0.30319.18400") then ("4.5") else if (version of it > "4.0.30319.18400" and version of it <= "4.0.30319.34000") then ("4.5.1") else if (version of it > "4.0.30319.34000" and version of it <= "4.5") then ("4.5.2") else (version of it as string)) of file "Microsoft.NET\Framework\v4.0.30319\clr.dll" of windows folder) else (((if exists (it) then (if (exists value "Version" of it) then (value "Version" of it as string) else ("Unknown")) else ("Unknown")) of key ("HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v" & (maximum of (it as version) of names of keys whose (name of it as lowercase starts with "v") of key "HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP" of native registry) as string) of native registry) as string)

From my testing it seems to be 32-bit and 64-bit compatible and speedy, and correctly pulls in various versions from 3.5 from 4.6. Just wanted to post it here to see if anyone had any improvements or ideas.

Related:

.NET versioning is a mess and very confusing. What is this for? Just reporting?

I think this is really what you are looking for:

unique values of versions of (files "mscorwks.dll" of it; files "clr.dll" of it) of folders of folders whose(name of it starts with "Framework") of folders "Microsoft.NET" of windows folders

Note: on my windows 10 machine, this gives me 4.6.127.1 which isn’t accounted for in your logic.

I would definitely report this raw data in addition to parsing it out like you are doing to try to determine the actual version number info.

Your relevance above uses more IF-THEN-ELSE statements than needed. Many of those could be removed.


Here is one option:

(it as version) of unique values of names of keys whose(name of it as lowercase starts with "v") of keys "HKLM\Software\Microsoft\NET Framework Setup\NDP" of (x64 registries; x32 registries)

Another:

unique values of (it as string as trimmed string as version) of values "version" of (it; keys of it) of keys whose(name of it as lowercase starts with "v" AND not exists values "" whose("deprecated" = it) of it) of keys "HKLM\Software\Microsoft\NET Framework Setup\NDP" of (x64 registries; x32 registries)

Another:

(it as version) of unique values of names whose(exists (it as version)) of keys of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework" of (x64 registries; x32 registries)

Another:

(it as version) of unique values of names whose(it starts with "v") of folders of folders whose(name of it starts with "Framework") of folders "Microsoft.NET" of windows folders

Another:

unique values of versions of (files "mscorwks.dll" of it; files "clr.dll" of it) of folders of folders whose(name of it starts with "Framework") of folders "Microsoft.NET" of windows folders

If I combine them all together, I get this:

Q:unique values of (it as string) of (  ( (it as version) of unique values of names of keys whose(name of it as lowercase starts with "v") of keys "HKLM\Software\Microsoft\NET Framework Setup\NDP" of (x64 registries; x32 registries) );( unique values of (it as string as trimmed string as version) of values "version" of (it; keys of it) of keys whose(name of it as lowercase starts with "v" AND not exists values "" whose("deprecated" = it) of it) of keys "HKLM\Software\Microsoft\NET Framework Setup\NDP" of (x64 registries; x32 registries) );( (it as version) of unique values of names whose(exists (it as version)) of keys of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework" of (x64 registries; x32 registries) );( (it as version) of unique values of names whose(it starts with "v") of folders of folders whose(name of it starts with "Framework") of folders "Microsoft.NET" of windows folders );( unique values of versions of (files "mscorwks.dll" of it; files "clr.dll" of it) of folders of folders whose(name of it starts with "Framework") of folders "Microsoft.NET" of windows folders )  )
A: 1.0
A: 1.0.3705
A: 1.1.4322
A: 2.0.50727
A: 2.0.50727.4927
A: 2.0.50727.8669
A: 3.0
A: 3.0.30729.4926
A: 3.5
A: 3.5.30729.4926
A: 4
A: 4.0
A: 4.0.30319
A: 4.6.127.1
A: 4.6.79

To get the maximum of all of those values:

Q:maximum of pads of (it as version) of unique values of (it as string) of (  ( (it as version) of unique values of names of keys whose(name of it as lowercase starts with "v") of keys "HKLM\Software\Microsoft\NET Framework Setup\NDP" of (x64 registries; x32 registries) );( unique values of (it as string as trimmed string as version) of values "version" of (it; keys of it) of keys whose(name of it as lowercase starts with "v" AND not exists values "" whose("deprecated" = it) of it) of keys "HKLM\Software\Microsoft\NET Framework Setup\NDP" of (x64 registries; x32 registries) );( (it as version) of unique values of names whose(exists (it as version)) of keys of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework" of (x64 registries; x32 registries) );( (it as version) of unique values of names whose(it starts with "v") of folders of folders whose(name of it starts with "Framework") of folders "Microsoft.NET" of windows folders );( unique values of versions of (files "mscorwks.dll" of it; files "clr.dll" of it) of folders of folders whose(name of it starts with "Framework") of folders "Microsoft.NET" of windows folders )  )
A: 4.6.127.1
1 Like

Thanks James. My use case is for reporting/auditing purposes, but this came about because we will soon be deploying some custom software that requires .NET 4.5.2 or higher. So I’m only interested in the “newest” version. I don’t care about the older versions. Your last relevance takes care of that scenario and works great on my lab devices.

But ideally the final result would correspond to the “public” (for lack of a better term) releases of .NET: 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, and 4.6 instead of what it currently returns, especially for 4.5.X installations. For those devices, after I run your last analysis I am getting back 4.5, 4.5.50501, 4.5.50938, 4.5.51209, 4.5.51641, 4.5.52301, etc. That’s why I was using those if statements. I don’t want any developers who end up using this analysis to have to “decode” the results.

1 Like

Windows Patching Fixlets only needs to detect certain major versions exist, thus it’s using a simpler logic, as defined here: https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx

So e.g. to detect .NET 4.6 on all Windows OSes:

exists key "HKLM\Software\Microsoft\NET Framework Setup\NDP\v4" whose (exists key "Full" whose (((it = 393295 OR it = 393297)) of value "Release" of it) of it) of native registry

I understand the need to decode it for them, but I would also have the raw values as well as they might need it to debug an issue that may occur between releases of the same version due to an update.

Also, it bugs me that Microsoft doesn’t provide a “friendly name” somewhere that can be queried easily for all of these releases.

BaiYunfei, thanks for the info on the Release value, but I believe that only pertains to 4.5+ and I would like this analysis to catch all versions for reporting & remediating.

James, good point about keeping the raw values. I ended up creating two properties to capture both. For the full version and build, I use this relevance based on your submission:

((maximum of unique values of versions of (files "clr.dll" of it) of folders of folders whose (name of it starts with "Framework") of folders "Microsoft.NET" of windows folders) | (maximum of (unique values of (it as string as trimmed string as version) of values "version" of (it; keys of it) of keys whose (name of it as lowercase starts with "v" and not exists values "" whose ("deprecated" = it) of it) of keys "HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP" of native registry))) as string | "Unknown"

I removed some of the checks since further research and testing showed that these two checks (the clr.dll version and the Version reg key) encompass all .NET versions. I give the clr.dll version precedence since those versions are more likely to be present in our environment, and it also results in the version.build values that you find more often when searching online. For example, the clr.dll version for my .NET 4.5 devices returned 4.0.30319.17626, while the Version reg key returned 4.5.50501.0. Since Microsoft usually posts the clr.dll version in their KBUpdate info, I had more success finding that value online.

For the “decoded” property, I used the following variation on the initial relevance I posted and your suggestions:

((if (it > "4.0.30319.0" and it <= "4.0.30319.17000") then ("4.0") else if (it > "4.0.30319.17000" and it <= "4.0.30319.18400") then ("4.5") else if (it > "4.0.30319.18400" and it <= "4.0.30319.34000") then ("4.5.1") else if (it > "4.0.30319.34000" and it <= "4.5") then ("4.5.2") else (it as string)) of maximum of unique values of versions of (files "clr.dll" of it) of folders of folders whose (name of it starts with "Framework") of folders "Microsoft.NET" of windows folders) as string | (maximum of unique values of ((it as version) of unique values of names of keys whose (name of it as lowercase starts with "v") of keys "HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP" of native registry) as string) | "Unknown"

Again, this first looks for the clr.dll since that is likely to stick around and get updated by Microsoft. If it is a version that I don’t specifically “decode”, then it falls through and just returns the actual version. For example this relevance returns 4.6.100.0 on my work laptop. I also tested with a fake future version of the clr.dll to simulate .NET v5.X, and it returned that version correctly. Otherwise, this property returns a single value like 2.0, 3.5, 4.0, 4.5, 4.5.1, etc.

Thanks again for your help. I’m certain this will be useful for others.

1 Like

I noticed some discrepancies with the output of this relevance and the applicability of the .NET 4.5.2 install fixlet, so I did some digging. Interestingly enough, Microsoft posted a separate article on “finding .NET versions installed” (below) and used a completely different method in the other post. It uses the registry instead of the clr.dll file. I’ve written relevance that uses the data from that article to return the .NET version and it seems to be working for me now. Hopefully others will find this useful.

https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx

if(exists key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP" of native registry)then((if(exists key "v4" whose (exists key "Full" whose (exists value "Release" of it) of it) of it)then(((if(it = 378389)then("4.5")else(if(it = 378675 OR it = 378759)then("4.5.1")else(if(it = 379893)then("4.5.2")else(if(it = 393295 OR it = 393297)then("4.6")else(if(it = 394254 OR it = 394271)then("4.6.1")else(if(it = 394802 OR it = 394806)then("4.6.2")else("Unknown v4.x release - " & it as string))))))) of value "Release" of key "Full" of it) of key "v4" of it)else(maximum of (values "Version" of keys of it as string as version) as string)) of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP" of native registry)else("Not Installed")

Hi Josh, I’m glad you found something that worked for you. However, I’m not sure this is a good universal solution. There are two issues that I see so far.

First of all, if it gets down to the relevance that checks the older Version registry key instead of the Release key, I am getting incorrect values for my XP/.NET 4.0 boxes.

Here is a snippet from your code:

q: ((values "Version" of keys of it as string as version) as string) of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP" of native registry
A: 2.2.30729
A: 3.2.30729
A: 3.5.30729.1

While the relevance @jgstew and I created picks up the correct 4 value:

 q: (unique values of ((it as version) of unique values of names of keys whose (name of it as lowercase starts with "v") of keys "HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP" of native registry) as string)
A: 1.1.4322
A: 2.0.50727
A: 3.0
A: 3.5
A: 4

q: unique values of versions of (files "clr.dll" of it) of folders of folders whose (name of it starts with "Framework") of folders "Microsoft.NET" of windows folders
A: 4.0.30319.296

If you do decide to stick with your code, I would caution against comparing the 378389, 394254 etc values using the equals operator. For example, we have a number of boxes with .NET 4.5.2 that come up with results like “Unknown v4.x release - 378758” and “Unknown v4.x release - 379981” because your code uses = instead of <= and >=.

That being said, what discrepancies did you find with the results from your devices? I would like to improve the existing analysis to catch all .NET variations. Microsoft certainly hasn’t made it easy! :relaxed:

Sean

Thank you for pointing out the use of = instead of < and >, I’ve used that to improve the query. The reason I went down this path yesterday is that we had a good chunk of our servers (about 15% of them) that were reporting v4.5.2 with your query, but were still reporting relevant to the .NET 4.5.2 install fixlet in the Patches for Windows site. That’s when I noticed the fixlet was using the registry method to identify applicable servers, then a quick google search found the MS article outlining the values.

Our problem stemmed from deploying SCCM 2012 across our environment, which comes with .NET 4.5.2, but it seems to not have been completely installed on said servers. Your query didn’t identify this pseudo-installation, but querying the registry did. After that, I was able to deploy .NET 4.5.2 itself, reboot the server and voila, both queries became in sync again, returning 4.5.2.

1 Like

@Sean Found this thread while looking for a .NET analysis for our environment. @josh.pena is correct, using the version for clr.dll no longer works, and Microsoft explicitly states that it’s not a reliable method for determining .NET framework versions.

From https://docs.microsoft.com/en-us/dotnet/api/system.environment.version?redirectedfrom=MSDN&view=netframework-4.7.2#remarks

For the .NET Framework 4.5 and later, we do not recommend using the Version property to detect the version of the runtime; instead, you can determine the version of the common language runtime by querying the registry. For more information, see How to: Determine Which .NET Framework Versions Are Installed.

I’ve verified this in our environment where clr.dll version was returning as 4.7.2, but the installed .NET Framework was only 4.5. So, the only reliable method is to use Microsoft’s recommendation for querying the value “Release” in key "
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full", and then decoding the version based on the returned value.

I modified the relevance query from @josh.pena for our environment using “>=” and adding versions beyond 4.6.2. However, because we want to find all versions installed on a computer, I don’t need the maximum value. My analysis simply has two queries. One for .NET v1.0 - v4.0 and one for .NET v4.5 - v4.7.2. The problem is the portion that gives the maximum of all values will then return versions under 4.5 in that column if v4.5+ is not installed. I just want it to skip to “Not Installed” if it doesn’t find v4.5+ installed. Can anyone help me out? I’m having a hard time with all the if/then and nesting going on. I’m also sure a lot of what I have can be made more efficient.

.NET v4.5 - v4.7.2

Q: if(exists key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP" of native registry)then((if(exists key "v4" whose (exists key "Full" whose (exists value "Release" of it) of it) of it)then(((if(it >= 378389 AND it < 378675)then("4.5")else(if(it >= 378675 AND it < 379893)then("4.5.1")else(if(it >= 379893 AND it < 393297)then("4.5.2")else(if(it >= 393297 AND it < 394271)then("4.6")else(if(it >= 394271 AND it < 394806)then("4.6.1")else(if(it >= 394806 AND it < 460805)then("4.6.2")else(if(it >= 460805 AND it < 461310)then("4.7")else(if(it >= 461310 AND it < 461814)then("4.7.1")else(if(it >= 461814)then("4.7.2")else("Unknown v4.x release - " & it as string)))))))))) of value "Release" of key "Full" of it) of key "v4" of it)else(maximum of (values "Version" of keys of it as string as version) as string)) of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP" of native registry)else("Not Installed")

.NET v1.0 - v4.0

Q: ((values "Version" of keys of it as string as version) as string) of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP" of native registry
2 Likes

Thanks for posting @jsast. I also ran into this with 4.7 and have been meaning to update this post. Can you see if this is accurate in your environment?

(if (it >= 378181 and it < 378675) then ("4.5") else if (it >= 378675 and it < 379893) then ("4.5.1") else if (it >= 379893 and it < 393295) then ("4.5.2") else if (it >= 393295 and it < 394254) then ("4.6") else if (it >= 394254 and it < 394802) then ("4.6.1") else if (it >= 394802 and it < 460798) then ("4.6.2") else if (it >= 460798 and it < 461308) then ("4.7") else if (it >= 461308 and it < 461808) then ("4.7.1") else if (it = 461808) then ("4.7.2") else (it as string)) of (value "Release" of key "HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry as integer) | (preceding text of last "." of it) of (value "Version" of key "HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry as string) | (maximum of unique values of (following texts of firsts "v" of (names of keys whose (name of it as lowercase does not start with "v4" and name of it as lowercase starts with "v") of key "HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP" of native registry) as version)) as string | "Unknown"

Yours returns the Release value (461814) on my Windows 10 machine, and not what the value converts to (which would be 4.7.2). That’s because you have 4.7.2 equaling 461808. When I changed it to >= 461808, it returns “4.7.2”. I’m running mine against server versions only, so I didn’t worry about the values MS has listed for Windows 10. But, since those values are still in-between the lower and higher versions, I could just change all my >= values to the ones listed for Windows 10. Also, keep in mind those Windows 10 values MS lists are only for specific major releases of Windows 10.

Btw, any tips on how I can get your query to reply with “Not installed” if v4.5+ isn’t installed? When I run it on servers without .NET v4.5+, but with lower versions installed, it will give me the highest version. We don’t want this as we want to know all versions installed, not just the highest. So, I already have a query that gives me all the versions v1.0 - v4.0. I need this second query to not give me the maximum version installed if anything under v4.5 is on the server.

Thanks @jsast, I’ve updated the 4.7.2 code to be the following:

if (it >= 461808 and it <= 461814) then ("4.7.2")

To answer your second question, I think you should just be able to cut out the latter part of the query since the doc here states “If the Full subkey is not present, then you do not have the .NET Framework 4.5 or later installed.”

So maybe this will work for your 4.5+ only analysis?

(if (it >= 378181 and it < 378675) then ("4.5") else if (it >= 378675 and it < 379893) then ("4.5.1") else if (it >= 379893 and it < 393295) then ("4.5.2") else if (it >= 393295 and it < 394254) then ("4.6") else if (it >= 394254 and it < 394802) then ("4.6.1") else if (it >= 394802 and it < 460798) then ("4.6.2") else if (it >= 460798 and it < 461308) then ("4.7") else if (it >= 461308 and it < 461808) then ("4.7.1") else if (it >= 461808 and it <= 461814) then ("4.7.2") else (it as string)) of (value "Release" of key "HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry as integer) | "Not Installed"

1 Like

I recently updated my .NET Framework analysis to do a similar task of converting the full .NET 4.X version string to the friendly version. It’s working flawlessly, from what I an tell on ~5,000 Windows servers. It could certainly be improved with some “It” though. Since most servers have a newer version, I am trying for a 4.8 and then going all the way down to 4.5 before returning a “N/A” answer as a fall back. :slight_smile:

I used the values as specified by Microsoft

If (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) >= 528040 then “4.8.0” else if (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) >= 461808 and (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) < 528040 then “4.7.2” else if (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) >= 461308 and (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) < 461808 then “4.7.1” else if (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) >= 460798 and (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) < 461308 then “4.7.0” else if (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) >= 394802 and (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) < 460798 then “4.6.2” else if (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) >= 394254 and (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) < 394802 then “4.6.1” else if (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) >= 393295 and (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) < 394254 then “4.6.0” else if (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) >= 379893 and (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) < 393295 then “4.5.2” else if (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) >= 378675 and (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) < 379893 then “4.5.1” else If (value “Release” of key “HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” of native registry) < 378389 then “4.5.0” else “N/A”

I think if you fill in the rest of the ReleaseID and readable version numbers, this form should meet what you’re doing

q: ((tuple string item 0 of it | "N/A") of tuple string of items 1 of items 1 of (it, (528040, "4.8.0"; 461808, "4.7.2"; 461308 , "4.7.1")) whose (item 0 of it >= item 0 of item 1 of it) of (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry as integer) | "None")
A: 4.8.0
T: 0.224 ms
I: singular string

If there is no NDP\v4\Full key, it returns “None”. If the key is present but has a Release value smaller than the minimum value it returns “N/A”, else it returns the first matching Release from the list.
The list of release-to-human-readable values needs to start with the highest and end with the lowest releases.

2 Likes

Nice stuff. The only caveat I would add is, there is a need to do a range of values to catch all. For example, on the 5-7k servers I have reporting in, show ~12 different Releases which is for sure more than the 10 versions MS has on their site. They state minimum version, which is what I used as the >= and < values.

:edit
Looks like MS has some C# code on that page, just doing >= and stepping down. Guess that would also simplify code, but being specific also works.

Recently MS released .NET Framework 4.8.1. This required a small update to my code. It’s not the prettiest code but it is easy to read even for novices and works.

This should work on any Windows OS but 99% of my testing and usecase is Server only.

If (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) >= 533320 then "4.8.1" else if (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) >= 528040 and (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) < 533320 then "4.8.0" else if (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) >= 461808 and (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) < 528040 then "4.7.2" else if (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) >= 461308 and (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) < 461808 then "4.7.1" else if (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) >= 460798 and (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) < 461308 then "4.7.0" else if (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) >= 394802 and (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) < 460798 then "4.6.2" else if (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) >= 394254 and (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) < 394802 then "4.6.1" else if (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) >= 393295 and (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) < 394254 then "4.6.0" else if (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) >= 379893 and (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) < 393295 then "4.5.2" else if (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) >= 378675 and (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) < 379893 then "4.5.1" else If (value "Release" of key "HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" of native registry) < 378389 then "4.5.0" else "N/A"
2 Likes

Hello Folks
I am having .Net core runtime which is installed in the server and i want to create analysis for it ,Can you anyone help me on this please

Microsoft .NET Core XX

Package Name:
Microsoft .NET Runtime - 8*
Version:
8.0.*
Vendor:
Microsoft Corporation

.NET Core is quite different than .NET Framework. The former is an installable app (essentially) where .NET Framework integrates with the OS.

There are probably a few options, but I would search Microsoft’s site for their recommended method to detect (similar to .NET Framework links at top of this topic).

A few tips. I would suspect you can leverage the Add/Remove Programs data, also leverage the HCL provided .NET core fixlets by reviewing the relevance, and it’s possible there could also be a section in the registry (similar to .NET Framework).

@DerrickD , Thanks and i will check the Registry key if i can find to call, thank you.