Skip to content

MissingMethodException when calling method prior to hot reload change #65442

@isadorasophia

Description

@isadorasophia

Version Used: VS 17.4 with .NET 6/7
Steps to Reproduce:

  1. Debug the following app with F5
static void Bar()
{
    return;
}

static void Main()
{
    Debugger.Break();

    Bar(); 
}
  1. Enter break state and modify Bar()
static void Bar(int foo = 0)
{
    return;
}
  1. Continue

Expected
We successfully hot reload and call Bar().

Actual
When calling bar, we see an exception being thrown.

System.MissingMethodException: 'Attempted to access a missing method.'

Fix
Consider adding a better error message once this message occurs so the user can understand what actually happened. The hot reload issue itself is already being addressed.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions