如何创建我的组件的自定义属性? [英] How can I create a custom Property for my assembly?

查看:146
本文介绍了如何创建我的组件的自定义属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建一个自定义属性为我的.NET程序集,然后这将在Windows资源管理器的详细信息选项卡?

How can I create a custom property for my .Net assembly which would then be visible under the Details tab in Windows explorer?

东西坐平行文件说明,类型,产品版本...等

Something to sit parallel with "File Description", "Type", "Product Version"... etc

更新:引述我的评论拉尔斯......虽然我也喜欢从Visual Studio中做到这一点,那肯定不是我的首要任务其实我希望能集成任何解决方案到现有的恶性构建过程如此。影响组件编译后是完全可以接受的。你有没有听说过这样的工具吗?

Update: To quote my comment to Lars ... "Whilst I would have liked to do this from within Visual studio, that is certainly not my priority. Actually I hope to integrate any solution into an existing nant build process. So affecting the assemblies post compile is entirely acceptable. Have you ever heard of such a tool?"

进一步更新:我不知道,如果我所谈论的是一个属性与否,澄清了一点什么,我想在下面的属性页中的条目...

Further Update: I'm not sure if what I'm talking about is an attribute or not, to clarify a little what I would like to creat in an entry in the following property page...

推荐答案

您的编译器不支持它。 AssemblyFileVersionAttribute和所有的工作,因为编译器会生成一个名为 VERSIONINFO 在汇编Win32资源在该资​​料它。这就是窗户是阅读。其他属性都只是保存元数据连同你的$ ​​C $ C。

Your compiler does not support it. AssemblyFileVersionAttribute and all work because the compiler generates a win32 resource in your assembly called VERSIONINFO with that information in it. That is what windows is reading. Other attributes are just saved as metadata along with your code.

您可以做一个工具,编译后改变了VERSIONINFO资源。

You could make a tool to change the VERSIONINFO resource after you compile.

这篇关于如何创建我的组件的自定义属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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