-
Notifications
You must be signed in to change notification settings - Fork 657
Closed
Description
Describe the bug
Latest version 5.3.6 fails in .Net Standard 2.0
builds.
Expected Behavior
Expected build to not fail. Version 5.3.5 builds all frameworks correctly.
Actual Behavior
During build of a dll in .Net Standard 2.0
I am getting following error:
Unity.Abstractions -> D:\a\abstractions\abstractions\src\bin\Release\netstandard2.0\Unity.Abstractions.dll
obj\Release\netstandard1.6\GitVersionInformation.g.cs(12,42): error CS0234: The type or namespace name 'ExcludeFromCodeCoverageAttribute' does not exist in the namespace 'System.Diagnostics.CodeAnalysis' (are you missing an assembly reference?) [D:\a\abstractions\abstractions\src\Unity.Abstractions.csproj]
The generated file fails on line 12:
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// GitVersion
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[global::System.Runtime.CompilerServices.CompilerGenerated]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] <-- This line fails in NETSTANDARD2_0
static class GitVersionInformation
{
public static string Major = "6";
public static string Minor = "0";
public static string Patch = "0";
. . .
}
Possible Fix
Reverted to previous version for now
Steps to Reproduce
For more information please follow this link and examine Build
step.
Context
I am using GitVerion tool in CI builds. The library is added to projects during CI steps
Your Environment
netstandard2.1;netstandard2.0;netstandard1.6;netcoreapp3.0;netcoreapp2.0;netcoreapp1.0;net48;net47;net46;net45;net40
- Version Used: 5.3.6
- Link to your project: https://github.com/unitycontainer/abstractions
- Link to your CI build (if appropriate): https://github.com/unitycontainer/abstractions/blob/release/6.0.0/.github/workflows/cd-flow.yml