LMCompany
LMCompany

Reputation: 111

how check is .NET framework installed or not

I want to develop a .NET application in c# but first i need to check
that the .NET framework is installed , because i don't want user see any error.
so is there any vc++ code that only use MFC in a static Library to check if .NET framework is installed ?

Upvotes: 3

Views: 7505

Answers (2)

CodeWarrior
CodeWarrior

Reputation: 1

  1. Check if the file MSCorEE.dll is present in the %SystemRoot%\System32 directory.
  2. Also the .Net Framework SDk includes a utility called CLRver.exe which shows versions of .Net framework installed on your machine

Upvotes: -1

Niranjan Singh
Niranjan Singh

Reputation: 18260

You can use the registry to check about .net framework and it's version, Either you you use VC++ or some other language that can handle registry..

Check Micrsoft Knowledge Base Article - How to determine which versions and service pack levels of the Microsoft .NET Framework are installed

There are various way suggested on SO thread.

Another one is using the Signum.Utilities library from SignumFramework (wich you can use stand-alone), you can get it nicely and without dealing with the registry by yourself.

Edit: Check this code project article - Is .NET Framework installed on this machine???, it is also using registry to get the framework installed or not..

Hope this help..

Upvotes: 5

Related Questions