mtelligent

View Original

Method get_XXX from assembly YYYY does not have an implementation

I just spent way too much time trying to figure out why a particular unit test was failing after a round of refactoring.

I kept getting an error that basically said "Method get_XXX from assembly YYYY does not have an implementation" and the test wouldn't even load. I couldn't even attach the debugger to it.

What made it equally confusing was that the code in question was really just a stub class I created for testing purposes.

Somewhat related was the fact that the assemblies I was testing were used in SharePoint, and I was running Visual Studio in my test SharePoint environment, so even though I updated the code and everything compiled fine, what I didn't realize was that the test was getting an old version of the dll from the GAC, hence the error.

I removed the dll from the gac and the test ran fine.