Skip to content

Commit f10e0e3

Browse files
authored
Fix VB code generator
This fixes the code generation of the ThisAssembly class for VisualBasic projects. Fixes #358
1 parent a37b160 commit f10e0e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Nerdbank.GitVersioning.Tasks/AssemblyVersionInfo.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,10 @@ internal override void StartThisAssemblyClass()
541541
{
542542
this.codeBuilder.AppendLine($"#If {CompilerDefinesAroundGeneratedCodeAttribute.Replace("||", " Or ")} Then");
543543
this.codeBuilder.AppendLine($"<System.CodeDom.Compiler.GeneratedCode(\"{GeneratorName}\",\"{GeneratorVersion}\")>");
544-
this.codeBuilder.AppendLine("#End If");
545544
this.codeBuilder.AppendLine("Partial Friend NotInheritable Class ThisAssembly");
545+
this.codeBuilder.AppendLine("#Else");
546+
this.codeBuilder.AppendLine("Partial Friend NotInheritable Class ThisAssembly");
547+
this.codeBuilder.AppendLine("#End If");
546548
}
547549

548550
internal override void AddThisAssemblyMember(string name, string value)

0 commit comments

Comments
 (0)