Skip to content

Commit ba1dee1

Browse files
authored
Add GeneratedCodeAttribute for F# & VB
1 parent 166a3e3 commit ba1dee1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Nerdbank.GitVersioning.Tasks/AssemblyVersionInfo.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,9 @@ internal override void EndThisAssemblyClass()
413413

414414
internal override void StartThisAssemblyClass()
415415
{
416-
this.codeBuilder.AppendLine("do()\r\ntype internal ThisAssembly() =");
416+
this.codeBuilder.AppendLine("do()");
417+
this.codeBuilder.AppendLine($"[<System.CodeDom.Compiler.GeneratedCode(\"{ThisAssembly.AssemblyName}\",\"{ThisAssembly.AssemblyVersion}\")>]");
418+
this.codeBuilder.AppendLine("type internal ThisAssembly() =");
417419
}
418420
}
419421

@@ -460,6 +462,7 @@ internal override void DeclareAttribute(Type type, string arg)
460462

461463
internal override void StartThisAssemblyClass()
462464
{
465+
this.codeBuilder.AppendLine($"<System.CodeDom.Compiler.GeneratedCode(\"{ThisAssembly.AssemblyName}\",\"{ThisAssembly.AssemblyVersion}\")>");
463466
this.codeBuilder.AppendLine("Partial Friend NotInheritable Class ThisAssembly");
464467
}
465468

0 commit comments

Comments
 (0)