Custom Assembly Attributes

Jan 19, 2012 at 3:45 PM

Hello I am working on a multi-project open source project and we are building Nuget packages.

 

We will be using GlobalAssembyInfo.cs method to share and simplify the process.

My question is the spec tags $id$ etc

would such a thing work with Custom Assembly Attributes?

like this http://www.codinghorror.com/blog/2004/11/custom-assemblyinfo-attributes.html

 

thank you

 

 

Developer
Jan 23, 2012 at 1:49 AM

Are you trying to use arbitrary assembly attributes as $x$ variables?

Jan 23, 2012 at 2:41 PM

I am trying to find a way to generate specs during the build process, and currently the "default" information generated for some of the nuget's nuspec files, is  generic and unusable.

I was hoping that like the provided attributes like $id$, I could add custom ones and use them in the spec.

Otherwise I'll have to write a console app to do a find and replace/reflection maybe to replace the values before calling the pack command.

Unless there is something I missed entirely.

Developer
Jan 23, 2012 at 5:54 PM

We do pick up some additional meta information from the AssemblyInfo.cs (title, version, and authors to be specific). Try running "nuget.exe spec <Proj file>" and it should create a nuspec file with some of the attributes already populated with replacement tokens.