获取解决方案/项目文件的列表VS加载或DXCore插件 [英] Get a list of Solution/Project Files for VS Add-in or DXCore Plugin

查看:246
本文介绍了获取解决方案/项目文件的列表VS加载或DXCore插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图写一个Visual Studio中加载项,除其他事项外,需要跟踪每个文件的Visual Studio解决方案。我知道我需要订阅什么事件(一个解决方案打开时,当添加一个文件/删除/编辑它,同样的项目等),但我不知道如何真正得到的文件列表从它的任何。

我最近安装$ C $粉碎,并已玩了DXCore框架。我很高兴与它在插件的方法,但我仍然没有看到一个明显的方式来获得在溶液中的文件列表。

所以总结起来:如何通过Visual Studio的SDK的的DXCore,我得到的解决方案文件的一个可靠的名单,它的项目

解决方案

这是所有可用容易在Visual Studio SDK使用DTE。

您可以使用项目得到的溶液中的项目清单接口。

您可以在一个项目中使用项目项获得的项目清单接口。

有关更多信息,我建议你在控制项目和解决方案阅读了

I am trying to write a add-in for Visual Studio that, among other things, needs to keep track of every file in a Visual Studio solution. I know what events I need to subscribe to (when a Solution is opened, when a file is added/removed/edited in it, the same for projects, etc), but I don't understand how to actually get a list of files from any of it.

I recently installed CodeRush and have been playing with the DXCore framework. I'm very happy with it's approach at plugins, but I still don't see an obvious way to get a list of files in the solution.

So to sum it up: How, via the Visual Studio SDK or DXCore, do I get a reliable list of files in the solution and it's projects?

解决方案

This is all available easily using DTE in the Visual Studio SDK.

You can get a list of projects in a solution using the Projects interface.

You can get a list of items in a project using the ProjectItem interface.

For more information, I'd recommend reading up on Controlling Projects and Solutions.

这篇关于获取解决方案/项目文件的列表VS加载或DXCore插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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