自定义属性-IExtenderProvider,FolderProperties以及如何查找ProjectItem [英] Custom properties - IExtenderProvider, FolderProperties and how to find ProjectItem

查看:41
本文介绍了自定义属性-IExtenderProvider,FolderProperties以及如何查找ProjectItem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我已经搜索了所有可用资源,但仍然找不到答案.我要在C#&中扩展文件夹的属性VB使用静态扩展程序提供程序进行项目,它可以按预期工作.我找不到可靠的方法,可以从FolderProperties(作为"extendee"对象获得)返回到适当的ProjectItem,因此我可以关联,保留和以其他方式处理我的自定义属性.

I've searched all available resources and still cannot find an answer. I'm extending properties for folders in C# & VB projects with static extender provider, it works as expected. What I can't find is reliable way to go back from FolderProperties (which I get as "extendee" object) to appropriate ProjectItem, so I can associate, persist and otherwise process my custom properties.

我知道我可以从解决方案(可以从IExtenderSite转换为ObjectExtenders后从IExtenderSite获得)中遍历所有方法,检查项目路径,处理链接文件以及msbuild的其他功能,但是我想知道是否有简单易用的方法方法.我以为可以将其(读取QI)转换为EnvDTE.Properties,但是不起作用.

I understand I can traverse all my way from Solution (which I can get from IExtenderSite after cast to ObjectExtenders), checking paths on projects, dealing with linked files, and other features of msbuild, but I wonder if there is simple straightforward way. I thought I can cast it (read QI) to EnvDTE.Properties, but it doesn't work.

谢谢.

PS:VS2005和Orcas环境.

PS: VS2005 and Orcas environment.

推荐答案

我无法完成对projectItems或Projects的扩展属性.我成功地做到了这一点.我将检查我的代码,但看起来很简单.同时,如果您能指出一个很好的例子.

I haven't been able to accomplish extending properties for projectItems, or Projects. I was successfully able to do this for the solution. I will look over my code but it seems pretty straight forward. In the meantime if you could point me at a good example.

注意,要理解您遇到的问题有些困难.

Note, it is a little bit hard to understand the problem you encountered. 

如果可以提供任何帮助,谢谢.

Thanks, if you can provide any help.


这篇关于自定义属性-IExtenderProvider,FolderProperties以及如何查找ProjectItem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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