visual-studio-extensions

Can a VIsual Studio extension be installed only for one project?


I'm working w/ a client who wants all developers to install a Visual Studio extension (XAML style in this case). I don't want this extension to effect all my projects. Short of creating a new user to login as (if that works), can a VStud extension be enabled by project by project/solution?


Solution

  • Can a VIsual Studio extension be installed only for one project?

    I'm afraid not. By default, Visual Studio installs extensions globally, meaning they are available across all projects and solutions. However, as you mentioned above, "Short of creating a new user to login as (if that works),", i think creating a new user may work.

    Most extensions are per-user extensions and are installed in the %LocalAppData%\Microsoft\VisualStudio\<Visual Studio version>\Extensions\ folder.

    A few extensions are administrative extensions and are installed in the <Visual Studio installation folder>\Common7\IDE\Extensions\ folder.

    So when you change an account for Windows, extensions from your previous account will not be loaded in the current Visual Studio.

    Login in with Account A and install this Visual Studio extension (XAML style in this case) to your project.

    Login in with Account B and check if this extension has been installed.

    Besides, if you consider installing multiple Visual Studio Instances, you can install this specific extension on VS2022 Community but not for VS2022 Profession.

    Docs Referred:

    Per-user and administrative extensions