where are custom extensions installed in visual studio?

Extensions (if deployed as VSIX) will be installed to the userĀ“s profile; each extension will be installed into a folder with a random name, for instance:

%LocalAppData%\Microsoft\VisualStudio\12.0\Extensions\s5lxc0ne.1kp

If you want to obtain the package installation path at runtime, you can obtain that information from the assembly that defines the Package class.

static string GetAssemblyLocalPathFrom(Type type)
{
    string codebase = type.Assembly.CodeBase;
    var uri = new Uri(codebase, UriKind.Absolute);
    return uri.LocalPath;
}

...

string installationPath = GetAssemblyLocalPathFrom(typeof(MyPackage));

Leave a Comment