开发者

Visual Studio Add-in Exec running Automatically

开发者 https://www.devze.com 2023-01-01 23:04 出处:网络
Hey guys, I have a dilemma that I am uncertain about, as I not sure if it\'s is exactly possible for a Visual Studio Add-in to run its code automatically.

Hey guys, I have a dilemma that I am uncertain about, as I not sure if it's is exactly possible for a Visual Studio Add-in to run its code automatically.

I need an add-in that can 开发者_开发技巧run passively, like a logger for Visual Studios. However, the Exec method that I know so far can only execute commandbar functionality, but I need the code to execute when the user right-clicks, or select a line of text.

I was able to make an automatic logger if i put my code in the "querystatus", but that would be considered bad programming, and it does not log when I simply select a piece of text.

Does anyone know how to make a passive or automatic running code in Visual Studios?


Unfortunately I think you may need to implement this as a VS Package, which is a much more powerful way to extend Visual Studio. I'd highly recommend looking at the MSDN documentation regarding the "Integration Architecture", it will give you a good idea about the VS extensibility model works and some of the concepts that it uses.

More specifically to your problem, it sounds like you want to extend the Visual Studio editor. There's quite a bit of documentation about extending the editor on MSDN.

Hope this helps!

0

精彩评论

暂无评论...
验证码 换一张
取 消