How to find the .NET framework version for any DNN version using a DLL

Overview

If you would like to find the .NET version for a DNN build of when the DNN code was compiled, you will need to use a PowerShell script.

 

Prerequisites

  • Administrator access to PowerShell
  • Access to the DNN File structure

 

Solution

  1. Open the PowerShell Application.
  2. Copy the snippet of code below.
    [Reflection.Assembly]::ReflectionOnlyLoadFrom("C:\Users\Test\Desktop\Test\DotNetNuke.dll").CustomAttributes.Where({$_.AttributeType.Name -eq 'TargetFrameworkAttribute'}).ConstructorArguments.Value
  3. Change the Path after ReflectionOnlyLoadFrom to the path of your DotNetNuke.dll in the SiteRoot/Bin Folder.
  4. Press Enter.

The result you should get should be the .NET Framework version for when the DLL was complied. 

2020-07-21_12-59-10.png

Comments

0 comments

Please sign in to leave a comment.