Skip to content

Unnecessary suppression errors showing up in build using .NET 8 Preview 7 SDK #89206

Description

@mthalman

When attempting to build the runtime repo with the latest build of .NET 8 Preview 7 SDK, it produces the following errors:

CoreCLR

/vmr/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat.task/8.0.100-preview.7.23364.43/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : Unnecessary suppressions found. The APICompat suppression file can be updated by rebuilding with '/p:ApiCompatGenerateSuppressionFile=true' [/vmr/src/runtime/artifacts/source-build/self/src/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj]
/vmr/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat.task/8.0.100-preview.7.23364.43/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : CP0001 (Target: 'T:System.Diagnostics.DebuggerGuidedStepThroughAttribute') [/vmr/src/runtime/artifacts/source-build/self/src/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj]
/vmr/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat.task/8.0.100-preview.7.23364.43/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : CP0001 (Target: 'T:System.Runtime.CompilerServices.EagerStaticClassConstructionAttribute') [/vmr/src/runtime/artifacts/source-build/self/src/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj]
/vmr/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat.task/8.0.100-preview.7.23364.43/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : CP0016 (Target: 'M:System.Runtime.InteropServices.Marshal.GetObjectForNativeVariant``1(System.IntPtr)->T?:[T:System.Diagnostics.CodeAnalysis.MaybeNullAttribute]') [/vmr/src/runtime/artifacts/source-build/self/src/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj]

Libraries

/vmr/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat.task/8.0.100-preview.7.23364.43/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : Unnecessary suppressions found. The APICompat suppression file can be updated by rebuilding with '/p:ApiCompatGenerateSuppressionFile=true' [/vmr/src/runtime/artifacts/source-build/self/src/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj]
/vmr/src/runtime/artifacts/source-build/self/package-cache/microsoft.dotnet.apicompat.task/8.0.100-preview.7.23364.43/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.Common.targets(16,5): error : CP0001 (Target: 'T:System.Runtime.InteropServices.JavaScript.WebWorker', Left: 'ref/net8.0/System.Runtime.InteropServices.JavaScript.dll', Right: 'runtimes/browser/lib/net8.0/System.Runtime.InteropServices.JavaScript.dll') [/vmr/src/runtime/artifacts/source-build/self/src/src/libraries/System.Runtime.InteropServices.JavaScript/src/System.Runtime.InteropServices.JavaScript.csproj]

These suppressions only seem to be relevant to Windows. So there needs to be a way to exclude these suppressions for Linux but include them for Windows.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions