VSIX 扩展向项目添加程序集引用 [英] VSIX extension adding assembly reference to project

查看:32
本文介绍了VSIX 扩展向项目添加程序集引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个应该能够将程序集添加到项目引用的扩展

Im building an extension that should be able to add an assembly to a projects references

此程序集包含在 VSIX 中

This assembly is included with the VSIX

在 VSIX 中包含程序集是个好主意吗?如何获取随 VSIX 分发的程序集的路径?

Is including the assembly with the VSIX a good idea ? How do I get the path to the assembly that was distributed with the VSIX ?

推荐答案

要获取你的 VSIX 扩展的部署目录,可以使用以下代码:

To get the deployment directory of your VSIX extension, you can use the following code:

System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)

然后只需将您的程序集名称添加到此路径.

Then just add your assembly name to this path.

这篇关于VSIX 扩展向项目添加程序集引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆