tags:

views:

1820

answers:

2
+3  Q: 

Path to MSBuild

Hi,

How can I programatically get the path to MSBUild from a machine where my .exe is running?

I can get the .NET version from the Environment but is there away of getting the correct folder for a .NET version?

Paul

+2  A: 

Poking around the registry, it looks like

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\3.5

may be what you're after; fire up regedit.exe and have a look.

Brian
A: 

The Registry locations

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\2.0
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\3.5

give the location for the executable.

But if you need the location where to save the Task extensions, it's on

%ProgramFiles%\MSBuild
Paulo Santos