Visual Studio 2010 SDK 扫描项目中的源文件

发布于 2024-09-12 10:37:06 字数 399 浏览 1 评论 0原文

我正在使用 2010 SDK,我试图找出如何以某种方式与 VS 结合,我有一个正在运行的后台进程,该进程不断分析当前项目中的 .CS 文件并将它们添加到字典中,以便我可以显示我拥有的自定义文本文档编辑器中的一些图形提示。

我在这里做了很多研究: http://msdn.microsoft.com/en-us/library/bb166441。 aspx

但我似乎找不到一种方法来“挂钩”到 VS ...某种入口点,以便该服务可以在项目打开时在后台运行。

到目前为止,我有一个编辑器分类器项目,我已经对编辑器进行了一些修改...如何在后台监视文件?

I'm working with the 2010 SDK and I am trying to figure out how to tie into VS in someway that I have a background process running that is constantly analyzing .CS files in the current project and adding them to a dictionary so I can show some graphical cues in the editor of a custom text document that I have.

I have been doing quite a lot of research here:
http://msdn.microsoft.com/en-us/library/bb166441.aspx

But i cant seem to find a way to "Hook" into VS ...sort of an entry point so this service can run in the background while the project is open.

So far I have an Editor Classifier Project that I have done some modifications to the editor with...how can I monitor files in the background?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾城泪 2024-09-19 10:37:07

您可以实现 IVsTrackProjectDocumentsEvents2 接口来侦听项目事件,例如向项目添加文件。

OnAfterAddFilesExOnAfterRemoveFilesOnAfterRenameFiles 是您感兴趣的方法。

You can implement the IVsTrackProjectDocumentsEvents2 interface to listen to project events such as adding a file to a project.

OnAfterAddFilesEx, OnAfterRemoveFiles, and OnAfterRenameFiles are the methods you'll be interested in.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文