Custom attributes aren't being displayed
-
I haven't created custom assembly attributes before, so maybe this isn't possible, but what I'd like to do is compile a custom assembly attribute and have it displayed to the user if they get the properties of the DLL. I'm using C#, VS2008, and .NET 3.5. I've added custom attributes to my DLL (ala http://www.codinghorror.com/blog/2004/11/custom-assemblyinfo-attributes.html[^]). It compiles and I've verified that the custom attributes are in the compiled assembly (with Reflector), but when I select the DLL and view the properties (via Windows Explorer) and then view the 'Details' tab, my custom properties aren't displayed. This is the first time Ive ventured into this area... is this possible? Or does Windows Server 2008 only display a list of known assembly attributes? Thanks, Jeff
-
I haven't created custom assembly attributes before, so maybe this isn't possible, but what I'd like to do is compile a custom assembly attribute and have it displayed to the user if they get the properties of the DLL. I'm using C#, VS2008, and .NET 3.5. I've added custom attributes to my DLL (ala http://www.codinghorror.com/blog/2004/11/custom-assemblyinfo-attributes.html[^]). It compiles and I've verified that the custom attributes are in the compiled assembly (with Reflector), but when I select the DLL and view the properties (via Windows Explorer) and then view the 'Details' tab, my custom properties aren't displayed. This is the first time Ive ventured into this area... is this possible? Or does Windows Server 2008 only display a list of known assembly attributes? Thanks, Jeff
The short answer is that this isn't possible. The explorer process in Windows only displays properties that it "knows" about. The assembly attributes that you are seeing are assembly attributes that the compiler adds to a Win32 resource which is embedded in the assembly. Those attributes map to specific entries in the resource, which the OS knows how to display. It is possible to do this (for example, Office files like Word), but it isn't simple and can't be done from managed code.
Scott Dorman
Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]
Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
-
The short answer is that this isn't possible. The explorer process in Windows only displays properties that it "knows" about. The assembly attributes that you are seeing are assembly attributes that the compiler adds to a Win32 resource which is embedded in the assembly. Those attributes map to specific entries in the resource, which the OS knows how to display. It is possible to do this (for example, Office files like Word), but it isn't simple and can't be done from managed code.
Scott Dorman
Microsoft® MVP - Visual C# | MCPD President - Tampa Bay IASA [Blog][Articles][Forum Guidelines]
Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai