DotNetDetector: a Microsoft .NET Framework detector

Posted on 10.09.12

0



DotNetDetector is a tool that detects Microsoft .NET Framework versions. The tool is written in C# .NET, and requires .NET 2.0. The project is open source and hosted at GitHub. The project site wiki has documentation. At the moment the tool detects these versions of the framework:

  • Microsoft .NET Framework 2.0 and the two service packs
  • Microsoft .NET Framework 3.0 and the two service packs
  • Microsoft .NET Framework 3.5 and the service pack
  • Microsoft .NET Framework 4.0 and the profiles

DotNetDetector is distributed as:

  1. NuGet package
  2. PowerShell module

DotNetDetector is designed to be:

Here is a simple C# console application that uses the framework:

using System;
using DotNetDetector;

namespace DotNetDetectorApp
{
    class Program
    {
        static void Main(string[] args)
        {
            foreach (var version in Detector.Versions)
            {
                Console.WriteLine(version.ToString());
            }
            Console.ReadKey();
        }
    }
}

Here is the output:

Microsoft .NET Framework 4.0 Full Profile
Microsoft .NET Framework 3.5 Service Pack 1 Full Profile
Microsoft .NET Framework 3.0 Service Pack 2 Full Profile
Microsoft .NET Framework 2.0 Service Pack 2 Full Profile

For more information please have a look at the project wiki.

Advertisements
Tagged:
Posted in: Uncategorized