File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/Nerdbank.GitVersioning.Tasks Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,14 @@ private CodeTypeDeclaration CreateThisAssemblyClass()
119119 {
120120 IsClass = true ,
121121 IsPartial = true ,
122- TypeAttributes = TypeAttributes . NotPublic | TypeAttributes . Sealed ,
122+ TypeAttributes = TypeAttributes . NotPublic | TypeAttributes . Sealed | TypeAttributes . Abstract ,
123123 } ;
124+
125+ var codeAttributeDeclarationCollection = new CodeAttributeDeclarationCollection ( ) ;
126+ codeAttributeDeclarationCollection . Add ( new CodeAttributeDeclaration ( "System.CodeDom.Compiler.GeneratedCode" ,
127+ new CodeAttributeArgument ( new CodePrimitiveExpression ( ThisAssembly . AssemblyName ) ) ,
128+ new CodeAttributeArgument ( new CodePrimitiveExpression ( ThisAssembly . AssemblyVersion ) ) ) ) ;
129+ thisAssembly . CustomAttributes = codeAttributeDeclarationCollection ;
124130
125131 // CodeDOM doesn't support static classes, so hide the constructor instead.
126132 thisAssembly . Members . Add ( new CodeConstructor { Attributes = MemberAttributes . Private } ) ;
You can’t perform that action at this time.
0 commit comments