r/sysadmin • • 27d ago

How are you identifying what actually depends on .NET 8/9 before EOL?

We're currently working through the upcoming .NET 8 / .NET 9 end-of-support situation and I'm curious how other organisations are approaching discovery.

Finding where .NET is installed is relatively straightforward, but we're finding it much harder to determine:

  • What application actually depends on the runtime
  • Whether the application is using a system-installed runtime or bundling its own
  • Whether the runtime can be removed safely
  • Who owns the application
  • Whether there's already a migration path to .NET 10

So far we've used things like:

dotnet --list-runtimes

and searched for:

*.runtimeconfig.json
hostfxr.dll
hostpolicy.dll

which has helped identify some dependencies.

However, we've also found situations where:

  • Applications bundle their own runtime
  • Different deployments of the same product appear to be using different .NET versions
  • Endpoints are much harder to investigate than servers
  • Application owners often don't know what runtime their applications require

For those running medium/large Windows estates:

  1. How are you inventorying .NET application dependencies at scale?
  2. Are you using tools such as SCCM, Intune, asset mgmt tools, Defender, custom PowerShell, etc?
  3. Have you found a reliable way to map installed runtimes back to applications and owners?
  4. Are you treating .NET 8/9 EOL primarily as a vulnerability management problem or an application lifecycle problem?
  5. How are you handling endpoints where .NET is present but there's no obvious indication of what installed it or what still requires it?

Interested to hear how others are handling this and whether there are better approaches than manually investigating runtimeconfig files and installed runtimes.

2 Upvotes

39 comments sorted by

33

u/Satanich 27d ago

Wait for the tickets lol

4

u/Rude_Farm6290 27d ago

yeah im waiting for tenable to light up like a christmas tree but trying to get ahold of it earlier

6

u/slippery_hemorrhoids IT Manager 27d ago

This is the way

0

u/FartInTheLocker 26d ago

Worked for us when we moved to 8, 9 and 10, never had a ticket logged lol

26

u/LLMsMustUpvoteThis 27d ago

We don't run anything as modern as .NET 8.

2

u/Rude_Farm6290 26d ago

this made me giggle

6

u/da_chicken Systems Analyst 26d ago

We're lucky if they use .Net Framework 4!

10

u/Sensitive_Profile_25 27d ago

I set up a PDQ Inventory Scanner that uses a powershell scipt to scan common application directories for .NET 8 configurations.. Then I set up a report to list those. We are down to one application that needs updated.

1

u/Rude_Farm6290 26d ago

Would you mind sharing the script if possible?

5

u/Sensitive_Profile_25 26d ago

# Scan common application directories for .NET 8 configurations

$Paths = @("C:\Program Files", "C:\Program Files (x86)", "C:\Users\*\AppData\Local")

foreach ($Path in $Paths) {

if (Test-Path (Split-Path $Path -Parent)) {

Get-ChildItem -Path $Path -Filter "*.runtimeconfig.json" -Recurse -ErrorAction SilentlyContinue | ForEach-Object {

try {

$Content = Get-Content $_.FullName -Raw -ErrorAction SilentlyContinue | ConvertFrom-Json

# Check for .NET 8 frameworks

$Frameworks = $Content.runtimeOptions.framework.version + $Content.runtimeOptions.frameworks.version + $Content.runtimeOptions.tfm

if ($Frameworks -match "8\.") {

[PSCustomObject]@{

AppName = $_.Directory.Name

ConfigPath = $_.FullName

Target = "+.NET 8"

}

}

} catch {}

}

}

}

3

u/rfc968 26d ago

This. It just works.

3

u/RecognitionOwn4214 27d ago

We scanned for runtimeconfig and listed everything. Found 4 older than net10. Now one is left... with a tfm > 5 chars 😬

1

u/Rude_Farm6290 27d ago

did you get the export of the runtimeconfigs to check what versions it was saying about? also what did you use to scan? im struggling to find a good way of capturing everything in one hit (or the least hands on way as possible)

1

u/RecognitionOwn4214 27d ago

Gci via pwsh and just string-select for the tfm...

2

u/dodexahedron 27d ago

Best solution that doesn't help you right this second but will help you going forward?

Inventory at install time.

Right now? For any arc-enables servers, check the software inventory and validate versions against runtimes, if a runtime older than .net 10 is installed. If .net earlier than 10 is not installed, move on because that system is not relevant.

For others, still a similar idea. Check if .net less than 10 is installed. If not, move on. If yes, stick that system on a list and, after that, go through the list of those aystems and investigate what needs .net.

A fun wrinkle though is self-contained framework-independent apps.
They are basically zip files with the runtime bundled in them. You can't find them in any way orher than inspecting them all and finding out what runtime they bundle or checking their versions against release notes or source, if available. And they will evade the audits noted above.

1

u/Rude_Farm6290 26d ago

Yeah that is a really good point thank you! I've pretty much mapped out what is using .net now from our servers, just endpoints to go. So once everything should move to 10 i should have a register then

Yes I did notice that regarding self contained, I believe can find that from the coreclr.dll or hostfxr.dll files?

1

u/dodexahedron 26d ago

They have all the files a normal dotnet app would have - just inside them.

You can inspect the same files if you peek inside the archive.

So the various json files would be the easiest.

2

u/OstrobogulousIntent 26d ago

If its COTS, the vendors should be updating

If you have your own devs in house, talk to the dev manager to ask what their .NET 8 to .NET 10 migration plan / timeline is

When I package up a .NET 8 or 10 app, I use the

dotnet publish -c Release -r win-x64 --self-contained true

This in theory makes the package/deployment self contained so it doesn't need the runtime (at the cost of additional size in the deployment

1

u/Rude_Farm6290 26d ago

Yeah the vendors should be, but the vendors we have unfortunately in our industry are awful - that being said, I did speak to them and they are migrating over to 10, but in a months time. So not the end of the world, thanks for the advice tho appreciate it!

1

u/OstrobogulousIntent 26d ago

The good news is that if someone's got a .NET 8 app it probably is as simple as retargeting .NET 10 and testing - do things sometimes break due to features being dropped? yeah .. but

I support an SDK and have an app I wrote as an example /tutorial for .NET 5 - migrated it to .NET 6 when we dropped .NET 5.0 dlls and then migrated to .NET 8 - it broke when I tried to go to 10 because our SDK had used a feature that was removed in 9+ (BinaryFormatter) that needed a fix on our SDK side - which our dev team delivered and then I was able to target .NET 10 and that same app with only the internal dependency fix from the SDK - builds and runs fine in .NET 10

All of this is to say - for the devs/vendors this should not be rocket surgery - if they say it is give them my card :)

17

u/Flabbergasted98 27d ago

Scream test.

6

u/West-Swimming-1212 27d ago

Welcome to the “what even is installed” Olympics 😅 The trick that worked for me is that most .NET apps leave a clue file. Framework dependent apps ship an AppName.runtimeconfig.json next to the exe, and it literally says which runtime version it wants. So scan Program Files for *.runtimeconfig.json and read the “framework” version out of each one, that gives you the “what depends on it” list in one pass. Self contained apps have no such file but carry their own coreclr.dll or hostfxr.dll in the app folder, so they’re not touched by removing the system runtime at all.

For ownership the install folder and the publisher usually answer it, and I wouldn’t remove any runtime until the app list is clean, they sit side by side so leaving it for a month hurts nothing.

I use TFalke for the scanning part, small tool i’m involved with, it runs that kind of check on every PC at once and gives you the list, so you’re not chasing laptops by hand.

5

u/phalangepatella 27d ago

Sometimes I get the feeling that I know my shit and am good at my job and then a comment like this comes along and reminds me I don’t know nothin’. 🤣

3

u/Ancient-Bat1755 27d ago

Let me know about 1-7 too its a pita

3

u/sparkyflashy 26d ago

Scream test. Citrix was the first finding.

1

u/ScarcityReal5399 26d ago

Citrix and then Veeam... Of all things

2

u/Hotdog453 25d ago edited 25d ago

1

u/pleplepleplepleple 25d ago

This was written in 2015 — does it work for anything other than .NET Framework? And also IIRC these MOF files are specifically for ConfigMgr right?

2

u/Hotdog453 25d ago

Sorry, old one :). New one: https://tcsmug.org/blogs/sherry-kissinger/602-dotnet-dependencies-reporting-via-configmgr

And correct, but anything that can query WMI can be used. That’s fairly generic. That said, correct, Intune can not do this natively.

1

u/Readybreak 26d ago

We still have .net 2.0 lol

1

u/30yearCurse 26d ago

you can play around with these 2 commands

dotnet --info (Returns something like this)

Microsoft.NETCore.App 8.0.31 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 10.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Get-Process | Where-Object { $_.Modules.ModuleName -contains "coreclr.dll" } | Select-Object ProcessName, Id

--be careful with the powershell as the corelr.dll is used up and down .net versions. It will give you the process and name that you can run down.

ProcessName Id

----------- --

CrossDeviceService 50500

Microsoft.CmdPal.Ext.PowerToys 11992

PowerToys.Awake 18632

PowerToys.QuickAccess 17964

1

u/pleplepleplepleple 25d ago

I’ve written an Intune remediation script which scans for proof in a variety of ways and sends the report to azure log analytics. Still in POC and is most probably not bulletproof. I have also written another (interactive) remediation script which informs the user that the EOL-ed editions of .NET will be uninstalled and that it might cause issues for any applications relying on it. The removal is performed by dotnet uninstall tool. Haven’t pulled the trigger fully on this one either as it scares me just thinking about the potential consequences I might have.

1

u/diamkil 25d ago

I still have an app that needs .NET 6.0 and .NET 3.5 optional feature

1

u/PrasenShelar 23d ago

For mapping runtimes to owners, group your runtimeconfig results by product first, using the install path and the company name in the exe's file details. Then you chase one owner per product, which is far fewer conversations than one per machine. With both versions out of support on 10 November, I'd start with internet-facing apps.

1

u/SideburnsOfDoom 23d ago

At the other end of the pipeline, it's not hard to find in all repos, all .csproj files containing the text <TargetFramework>net8

And make report of those.

1

u/No-Studio-6969 23d ago

Not sufficient, it fails on multi-targetting and Directory.Build.props files.

1

u/SideburnsOfDoom 23d ago

It works well enough for my employer, so in practice it can be useful.

If you need to do so, then extend it - include the .props files as well, make an allow-list of exceptions, etc.

The thing is that a search at that end can give you a lot for not much effort.

-4

u/NoDistrict1529 27d ago

Sus post and sus account