This post was most recently updated on June 18th, 2021.< 1 min read.
In this article, I’ll do my best to explain how to list all loaded assemblies in a PowerShell session. See PowerShell is great at caching assemblies in the weirdest possible way, so ending up with all kinds of mismatches in loaded DLL versions is pretty typical. Or just being plainly blocked from loading a new one as you already have a cached reference in. I mean, I’ve ran into all kinds of issues even if I only use PowerShell occasionally.
Or maybe that’s the reason.
Anyhow, below, I’ll share a script that’ll list all of the currently loaded assemblies
Let’s keep this short and sweet. The script below will select all assemblies that are currently loaded, select the ones with a defined location, and display their name, location and statuses of GAC deployment and full trust in a GridView.
Go ahead and run it in PowerShell:
[System.AppDomain]::CurrentDomain.GetAssemblies() | Where-Object Location | Sort-Object -Property FullName | Select-Object -Property FullName, Location, GlobalAssemblyCache, IsFullyTrusted | Out-GridView
You should get an output somewhat like this:
And there you go! You should see all of the assemblies PowerShell has in memory.
- HttpContext.WebSockets.IsWebSocketRequest always null in .NET Core? - July 27, 2021
- Docker-compose fails on Windows with “Error while fetching server API version: (2, ‘CreateFile’, ‘The system cannot find the file specified.’)” - July 20, 2021
- Azure DevOps suddenly 404s for your project? Easy fix! - July 13, 2021