Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
274 views
in Technique[技术] by (71.8m points)

.net - How can I create a custom Property for my assembly?

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

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...

alt text

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...