The official *managed* way to find the .NET Framework directory

Security Briefs

Syndication

Earlier today I posted the official unmanaged way to get the .NET Framework directory. Of course I was using P/Invoke to do it ;-) Mike Woodring commented with an easier, managed way:

HttpRuntime.ClrInstallDirectory

But then Stephen Toub (my editor at MSDN Mag) commented with an even better option:

System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()

Thanks guys!

 

 


Posted Oct 18 2005, 05:41 PM by keith-brown
Filed under:

Comments

Sean Chase wrote re: The official *managed* way to find the .NET Framework directory
on 10-18-2005 9:04 PM
Nice!
Dev Emporium wrote How to find the .NET Framework directory
on 10-24-2005 10:40 AM
Keith Brown had two posts recently detailing how to get the path to the .NET Framework directory on a...

Add a Comment

(required)  
(optional)
(required)  
Remember Me?