Determining Framework *Folder* at Runtime

Tada:

C#:
string frameworkFolder = new FileInfo(new Uri(typeof(string).Assembly.CodeBase).LocalPath).DirectoryName;

VB .NET (thanks Mick)
Dim frameworkFolder As String = New FileInfo(New Uri(GetAssembly(GetType(String)).CodeBase).LocalPath).DirectoryName

The result: "c:\windows\microsoft.net\v1.0.3705"

3 Comments

Comments have been disabled for this content.