从另一个加载项运行加载项 [英] Run Add-in from another add-in

查看:84
本文介绍了从另一个加载项运行加载项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我为visual studio 2010开发了加载项。

我正在寻找一些方法来运行加载项同一个Visual Studio实例中的另一个加载项。

是否可能?

如果是,请解释如何给出代码示例。



Thx。

Hello,

I developed add-in for visual studio 2010.
I am searching some way to run add-in from another add-in in the same visual studio instance.
Does it possible?
If yes please explain how \ give code example.

Thx.

推荐答案

我不认为你可以在不关闭VS的情况下做到这一点。但是,我不熟悉VS应用程序的域结构;从理论上讲,这可能是可能的,但会产生性能和冗余的复杂性问题:通过域墙工作本质上很复杂,并且涉及类似IPC的通信,因为应用程序域彼此隔离,非常类似于进程;他们在不同的地址空间工作。因此,如果我是Visual Studio的架构师,我不会添加这种复杂性,因为重新加载Visual Studio将是一个合理的解决方案。请注意,在相同的情况下,Visual Studio将被卸载,然后自动重新启动。这是非常有说服力的。



参见:

http://msdn.microsoft.com/en-us/library/yb506139%28v=vs.110%29.aspx [<一个href =http://msdn.microsoft.com/en-us/library/yb506139%28v=vs.110%29.aspxtarget =_ blanktitle =New Window> ^ ],

http://msdn.microsoft.com/en-us/ library / system.appdomain.aspx [ ^ ]。



所以,抱歉没有100%完成而不是100%确定的解决方案。我不能说我确定:在不重新加载Visual Studio的情况下替换加载项实现是完全不可能的。我只能说:在我看来,这个功能极不可能。我真的建议你不要试图实现这一目标。卸载Visual Studio并重新加载它不会给用户带来很大的负担。



-SA
I don't think you can do it without closing VS. However, I am not familiar with the domain structure of the VS application; theoretically speaking, it could be possible, but would create a performance and redundant complexity problem: working through the domain wall is inherently complex and involves IPC-like communication, because Application Domains are isolated from each other, pretty much like processes; they work in separate address spaces. So, if I was the architect of the Visual Studio, I would not add this complexity, because reloading Visual Studio would be a reasonable solution. Note that, in same cases, Visual Studio is unloaded and then automatically restarted. This is very indicative.

See also:
http://msdn.microsoft.com/en-us/library/yb506139%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/system.appdomain.aspx[^].

So, sorry for not 100% complete and not 100% certain solution. I cannot say "I am sure: replacing of the add-in implementation without reloading of Visual Studio is totally impossible". I can only say: in my opinion, this feature is highly unlikely. I really advise you not trying to achieve that. Unloading Visual Studio and loading it again is not a great burden you would put on your users.

—SA


这篇关于从另一个加载项运行加载项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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