Check .NET 4 Full Framework is installed

MarcelMalik picture MarcelMalik · Jul 15, 2010 · Viewed 13.2k times · Source

If the .NET 4 Framework is not installed, the application bring a message, but if only the client framework is installed and the application need the Full Framework, nothing happened and the application starts.

Is there a way to check if .NET 4 Full Framework is installed on the target system and not only the Client Framework?

I search a solution to check it with the "app.manifest" file or in C# on program start.

Answer

David picture David · Jan 20, 2011

The best way to check if it exists is to follow the advice of the authors and check for the existence of the appropriate registry entry.

The details for each of the keys, including .Net 4, can be found at this reference http://msdn.microsoft.com/en-us/kb/kbarticle.aspx?id=318785