Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingMethodException when calling method prior to hot reload change #65442

Open
isadorasophia opened this issue Nov 15, 2022 · 3 comments
Open
Assignees
Milestone

Comments

@isadorasophia
Copy link
Contributor

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.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead labels Nov 15, 2022
@tmat
Copy link
Member

tmat commented Nov 15, 2022

@davidwengier

@jasonmalinowski jasonmalinowski removed the untriaged Issues and PRs which have not yet been triaged by a lead label Nov 15, 2022
@jasonmalinowski jasonmalinowski added this to the Backlog milestone Nov 15, 2022
@davidwengier
Copy link
Contributor

There is a possibility we can be smart enough to trampoline the call for this one. Otherwise, better exception message content suggestions welcome :)

@tmat
Copy link
Member

tmat commented Nov 15, 2022

Something like "Method has been deleted or its signature changed by Edit and Continue. Update the caller to avoid this exception."?

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

No branches or pull requests

4 participants