Mandalorian
Mandalorian

Reputation: 335

How to check programmatically if .NET 4.7 Target Pack is installed?

Whe have found a way to check, if MsBuild.exe is installed, but we also need to know if the targeting pack for .NET 4.7 ist already installed or not. Visual Studio is not installed, only the Framework 4.7 and maybe the targeting pack ...

Does anyone know how to check it?

Upvotes: 4

Views: 3675

Answers (2)

Mandalorian
Mandalorian

Reputation: 335

It seems that you can see in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\ which targeting packs are installed. For each pack there will be a folder with its version number, for example

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\4.7

more information here

Upvotes: 12

Xaqron
Xaqron

Reputation: 30877

You can use some tools like RegMon and reverse engineer the process to find related registry keys.

Use a VM, run registry monitoring tool and install developer pack. After installation check for registry changes specially under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP path.

Upvotes: 0

Related Questions