You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Require RootNamespace and add C# 10 support with global usings.
The generator will not exclude global usings in the generated source as well as automatically adding the root namespace setting to the global usings as well as the namespace for the GitInformation attribute.
2. Set the following msbuild properties in your project (or if you have all project file property settings stored in a project specific ``Directory.Build.props``) file:
20
+
*``<GitBuildInfoIsGeneric></GitBuildInfoIsGeneric>`` (Optional, default is false)
21
+
*``<GitBuildInfoAssemblyType></GitBuildInfoAssemblyType>`` (Required, Note: Do not include anything before the type name like a fully qualified namespace or any ``.``'s. For that you need to set ``RootNamespace`` below)
22
+
*``<RootNamespace></RootNamespace>`` (Required unless you want the type to be assumed to be in the ``Elskom.Generic.Libs`` namespace by the generator)
23
+
3. The generator package should now run a build task to grab information prior to it executing the generator.
Copy file name to clipboardExpand all lines: src/GitBuildInfo.SourceGenerator/Directory.Build.props
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,8 @@
6
6
<Version>1.0.13</Version>
7
7
<PackageReleaseNotes>Fixed issue where building can result in a build performance decrease due to having the build task being inline.
8
8
Also made build task target .NET Standard 2.0 only.
9
-
I think this one should work for everyone even for those using .NET Framework's msbuild.</PackageReleaseNotes>
9
+
I think this one should work for everyone even for those using .NET Framework's msbuild.
10
+
Also the generator now requires setting the RootNamespace msbuild property that holds the type they specifiy in the GitBuildInfoAssemblyType msbuild property.</PackageReleaseNotes>
10
11
<Copyright>Copyright (c) 2021</Copyright>
11
12
<!-- Suppresses the warnings about the package not having assemblies in lib/*/.dll.-->
0 commit comments