Class ThisAssembly
This is a drop-in replacement for the GitInfo ThisAssembly class.
Namespace: Neon.BuildInfo
Assembly: Neon.BuildInfo.dll
Syntax
public static class ThisAssembly
Remarks
This is a workaround for duplicate symbol compiler errors we often see for more complex solutions that target multiple build configurations and target frameworks. The root problem is that the GitInfo nuget package generates a C# file under [/obj/$Configuration)] or [/obj/$Configuration)/$(TargetFramework)] and when there are multiple configurations and/or target frameworks, we can end up with multiple versions of the generated file and since MSBUILD recursively compiles all C# files within the project folder, we end up with compiler errors.
This library works by using the GitInfo nuget but this project only has one build configuration (Release) and only one target framework (netstandard2.0), so we we'll never see duplicate source files.