Retrieving .NET framework binaries directory

  • Thread starter Thread starter Dmitry Shaporenkov
  • Start date Start date
D

Dmitry Shaporenkov

Hi all,

I'd like to programmatically retrieve the directory
of .NET framework binary tools (csc.exe, RegAsm.exe).
What is the right way to do this? I can get InstallRoot
via the Registry and append System.Environment.Version to
form the path, but is there a shorter and nicer way?

Thanks in advance.
 
Hi!

You can do this using the GetCORSystemDirectory API. Include the
MSCOREE.H header and link to MSCOREE.LIB. These are present in the
"include" and "lib" folder respectively, in your .NET Framework SDK
installation folder.


Regards,
Gaurav Khanna
---------------
Microsoft MVP - .NET
WinToolZone - Spelunking Microsoft Technologies
http://www.wintoolzone.com/
OpSupport - Spelunking Rotor
http://opsupport.sscli.net/
 
Back
Top