Skip to content

UnmanagedCallersOnly test failing in the outerloop during compilation #42125

Closed
@janvorli

Description

@janvorli

The issue seems to be due to some C# compiler update - the failures seem to be at places of negative testing that expects runtime failures, but we started to get compilation failures instead.

/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(341,6): error CS8896: 'UnmanagedCallersOnly' can only be applied to ordinary static methods or static local functions. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(341,6): error CS8896: 'UnmanagedCallersOnly' can only be applied to ordinary static methods or static local functions.
/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(439,6): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(439,6): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type.
/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(440,48): error CS8894: Cannot use 'T' as a parameter type on a method attributed with 'UnmanagedCallersOnly'. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(440,48): error CS8894: Cannot use 'T' as a parameter type on a method attributed with 'UnmanagedCallersOnly'.
/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(520,10): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type. [/__w/1/s/src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.csproj]
##[error]src/tests/Interop/UnmanagedCallersOnly/UnmanagedCallersOnlyTest.cs(520,10): error CS8895: Methods attributed with 'UnmanagedCallersOnly' cannot have generic type parameters and cannot be declared in a generic type.

Log here:
https://dev.azure.com/dnceng/public/_build/results?buildId=811186&view=logs&j=db768a9e-3325-5ce3-2d52-896c40bee68a&t=59112ad9-fe58-56ee-6943-84df6f0e3f8e&l=13792

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions