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
New attribute was added to ThisAssembly auto-generatred file with condition '#if NETSTANDARD || NETFRAMEWORK || NETCOREAPP'. But ExcludeFromCodeCoverage itself available only from NETSTANDARD2_0.
Minimal repro: use Nerdbank.GitVersioning in netstandard1.4 project.
Workaround: declare ExcludeFromCodeCoverage in user code.
Full error:
CS0234 The type or namespace name 'ExcludeFromCodeCoverage' does not exist in the namespace 'System.Diagnostics.CodeAnalysis' (are you missing an assembly reference?) Assembly (netstandard1.1)
The text was updated successfully, but these errors were encountered:
In condition should be long list of target frameworks, where ExcludeFromCodeCoverage is not available. Like "#if NETSTANDARD1_0 || NETSTANDARD1_1 || NETSTANDARD1_2 ... || NETCOREAPP1_0". And I am not sure about some UWP and Xamarin frameworks.
AArnott
changed the title
[BUG] The type or namespace name 'ExcludeFromCodeCoverage' does not exist in the namespace
.NET Standard 1.x project build break from ThisAssembly's use of ExcludeFromCodeCoverage
Mar 15, 2020
New attribute was added to ThisAssembly auto-generatred file with condition '#if NETSTANDARD || NETFRAMEWORK || NETCOREAPP'. But ExcludeFromCodeCoverage itself available only from NETSTANDARD2_0.
Minimal repro: use Nerdbank.GitVersioning in netstandard1.4 project.
Workaround: declare ExcludeFromCodeCoverage in user code.
Full error:
CS0234 The type or namespace name 'ExcludeFromCodeCoverage' does not exist in the namespace 'System.Diagnostics.CodeAnalysis' (are you missing an assembly reference?) Assembly (netstandard1.1)
The text was updated successfully, but these errors were encountered: