static void AssemblyAdd( this D.CodeCompileUnit unit, string name, string value) { var type = "global::System.Reflection." + name; var declaration = new D.CodeAttributeDeclaration(type); var expression = new D.CodePrimitiveExpression(value); declaration.Arguments.Add(new D.CodeAttributeArgument(expression)); unit.AssemblyCustomAttributes.Add(declaration); }