Skip to content

Unhandled exception message is printed multiple times to console #115215

Closed

Description

@jkotas

This is recent regression.

C:\repro>type Program.cs
using System.Runtime.CompilerServices;

class Test
{

    static void Main()
    {
        M(null);
    }

    [UnsafeAccessor(UnsafeAccessorKind.Method, Name = "DoesNotExist")]
    static extern void M(Test dummy);
}
C:\repro>dotnet run
  Determining projects to restore...
  All projects are up-to-date for restore.
C:\net10p5\sdk\10.0.100-preview.5.25224.4\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targe
ts(326,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\r
epro\repro.csproj]
  repro -> C:\repro\bin\Debug\net10.0\repro.dll
Unhandled exception. System.MissingMethodException: Method not found: 'Test.DoesNotExist'.
   at Test.M(Test dummy)
   at Test.Main() in C:\repro\Program.cs:line 8
Unhandled exception. System.MissingMethodException: Method not found: 'Test.DoesNotExist'.
   at Test.M(Test dummy)
   at Test.Main() in C:\repro\Program.cs:line 8
   at Test.M(Test dummy)
   at Test.Main() in C:\repro\Program.cs:line 8

C:\repro>dotnet --version
10.0.100-preview.5.25224.4

Activity

  1. ghost added
    area-CodeGen-coreclr
    on May 1, 2025
  2. added
    area-ExceptionHandling-coreclr
    and removed
    area-CodeGen-coreclr
    on May 1, 2025
  3. added
    untriaged
    on May 1, 2025
  4. jkotas commented on May 1, 2025

    @jkotas
    MemberAuthor
  5. jkotas commented on May 1, 2025

    @jkotas
    MemberAuthor

    Regression introduced by #113980

  6. removed
    untriaged
    on Jun 12, 2025
  7. added this to the 10.0.0 milestone on Jun 12, 2025
  8. added a commit that references this issue on Aug 6, 2025
    77cd9fe
  9. added a commit that references this issue on Aug 8, 2025
    54e7818
  10. locked and limited conversation to collaborators on Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-ExceptionHandling-coreclr

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions