1

I have a simple .NET console application that I am using to test some new libraries I wrote and I keep receiving a System.MissingMethodException on a certain method in the console Program.cs file itself. The method worked previously, then all of a sudden the app started throwing the System.MissingMethodException error when that method is called (before even entering the method.

What I tried:

  • Cleaning application
  • Rebuilding
  • Removing all references to the libraries I am testing
  • Deleting all of the dll files from the bin folders for all of the programs

Why is it still throwing an error? I referenced these questions already:

System.MissingMethodException

System.MissingMethodException: Method not found?

Community
  • 1
  • 1
joshmcode
  • 3,471
  • 1
  • 35
  • 50

2 Answers2

0

My issue was that the System.MissingMethodException did not happen "all of a sudden" as I mention above. Instead, I had renamed my project and the Default namespace and Assembly name were still set in the Application settings to the previous name (I guess I thought it would have updated these?).

By updating these manually to the new name in the project properties (right-click the project and select properties), that method is now "found" by the application when called: see image below.

enter image description here

joshmcode
  • 3,471
  • 1
  • 35
  • 50
0

Try these options:

1) Make sure an old version is not in the GAC

2) Restart Visual Studio

3) Restart your computer

user3272686
  • 853
  • 2
  • 11
  • 23