Identify Assemblies and Applications .NET Runtime and Framework Versions

As .NET Frameworks versions expire, you may need to identify which applications need to be recompiled/retargeted with a new version of .NET Framework. One method I found was to use Mono.Cecil to gather .NET assembly information such as the runtime required as well as the .NET Framework version used. Note the Framework version is only available for assemblies using the 4.0 runtime and up.

For example, you can then do the following to capture information for multiple assemblies in IIS sites running .NET code:

(ls \\contoso001\c$\inetpub\wwwroot\*\*\bin\*.dll).FullName | .\Get-FrameworkVersion.ps1 | Export-Csv AssembliesVersions.csv -NoTypeInformation -Append

You can find the script here:

The new script and the required assembly are part of the new GEM Automation release.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s