-
-
Notifications
You must be signed in to change notification settings - Fork 177
Closed
Description
The new version 2.3.179 creates invalid code for Visual Basic projects for the ThisAssembly class.
The produced code is the following:
<Assembly: System.Reflection.AssemblyVersionAttribute("…")>
<Assembly: System.Reflection.AssemblyFileVersionAttribute("…")>
<Assembly: System.Reflection.AssemblyInformationalVersionAttribute("…")>
#If NETSTANDARD Or NETFRAMEWORK Or NETCOREAPP Then
<System.CodeDom.Compiler.GeneratedCode("Nerdbank.GitVersioning.Tasks","2.3.179.31651")>
#End If
Partial Friend NotInheritable Class ThisAssembly
…
End ClassThis is not valid in Visual Basic, because it's illegal for anything but more attributes to be written between the declaration of a type (or a member for that matter) and the attribute that will be applied to it. This includes the #End If instruction.
The only way to build what you did here as valid code is to include the declaration of the class in the header. Like so:
<Assembly: System.Reflection.AssemblyVersionAttribute("…")>
<Assembly: System.Reflection.AssemblyFileVersionAttribute("…")>
<Assembly: System.Reflection.AssemblyInformationalVersionAttribute("…")>
#If NETSTANDARD Or NETFRAMEWORK Or NETCOREAPP Then
<System.CodeDom.Compiler.GeneratedCode("Nerdbank.GitVersioning.Tasks","2.3.179.31651")>
Partial Friend NotInheritable Class ThisAssembly
#Else
Partial Friend NotInheritable Class ThisAssembly
#End If
…
End ClassMetadata
Metadata
Assignees
Labels
No labels