C# 如何使用.VSIX包中的内容?如何获取VSIX安装路径

C# 如何使用.VSIX包中的内容?如何获取VSIX安装路径,c#,vsix,C#,Vsix,现在我在.VSIX包中使用addfolder <Content Include="..\..\MyContentFiles\**\*.*"> <Link>%(RecursiveDir)%(Filename)%(Extension)</Link> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> 但他们都回到了这条路 C:

现在我在.VSIX包中使用addfolder

<Content Include="..\..\MyContentFiles\**\*.*">
  <Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
  <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
但他们都回到了这条路

C:\Program Files(x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE


那么如何获取vsix安装路径以及如何使用.vsix中的内容呢?现在问题已经解决了

我使用此api获取vsix安装物理路径:

string path = System.Reflection.Assembly.GetExecutingAssembly().Location;
path=\AppData\Local\Microsoft\VisualStudio…\Extensions[安装路径]\xx.dll

string path = System.Reflection.Assembly.GetExecutingAssembly().Location;