How get the current running Visual Studio installation path from VSPackage

前端 未结 3 1685
梦毁少年i
梦毁少年i 2021-01-13 20:47

I\'ve created a VSPackage which should copy some XML schema files to Visual Studio\'s installation path: %VS install path% \\Xml\\Schemas.

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-13 21:28

    Your package will not be able to copy files to the VS installation path because admin rights are required for that and VS doesn't run elevated (with admin rights) by default, and a package should not force VS to run elevated. The setup of your package could do that, but not your package.

    That said, see:

    HOWTO: Get information about the Visual Studio IDE from a Visual Studio package.

提交回复
热议问题