.net - What are the best practices for using Assembly Attributes? -
i have solution multiple project. trying optimize assemblyinfo.cs files linking 1 solution wide assembly info file. best practices doing this? attributes should in solution wide file , project/assembly specific?
edit: if interested there follow question what differences between assemblyversion, assemblyfileversion , assemblyinformationalversion?
we're using global file called globalassemblyinfo.cs , local 1 called assemblyinfo.cs. global file contains following attributes:
[assembly: assemblyproduct("your product name")] [assembly: assemblycompany("your company")] [assembly: assemblycopyright("copyright © 2008 ...")] [assembly: assemblytrademark("your trademark - if applicable")] #if debug [assembly: assemblyconfiguration("debug")] #else [assembly: assemblyconfiguration("release")] #endif [assembly: assemblyversion("this set build process")] [assembly: assemblyfileversion("this set build process")]
the local assemblyinfo.cs contains following attributes:
[assembly: assemblytitle("your assembly title")] [assembly: assemblydescription("your assembly description")] [assembly: assemblyculture("the culture - if not neutral")] [assembly: comvisible(true/false)] // unique id per assembly [assembly: guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")]
you can add globalassemblyinfo.cs using following procedure:
- select add/existing item... in context menu of project
- select globalassemblyinfo.cs
- expand add-button clicking on little down-arrow on right hand
- select "add link" in buttons drop down list
Comments
Post a Comment