Error with Extract Method

When we started refactoring CubeEditor.cs I wasn’t able to run extract method. It would throw the error (ExtractMethodCodeRefactoringProvider encountered an error and has been disabled) at the top of VS every time.

I didn’t want to manually extract these things, so I rebooted vs, rebooted unity, rebooted my computer, updated vs, all to no avail.

In this post, someone mentions it’s a variable problem so I started playing with my variables.

Once I changed gridSize back from being a const to what it was before, I no longer got the error and was able to use extract method and move on.

This all happened last night and when I came here today to share this knowledge I am no longer able to repeat the problem… so I’m trying to remember the best I can. Hopefully this will help someone else that gets this problem.

Thanks a lot for sharing this information. Did you perhaps enable an auto update which could have fixed the problem?

I didn’t know auto update was an option, and in fact it feels like any updates might break a project… so I tell all update notices to go away until i’m finished with a project.

The error had randomly happened again and a restart corrected it, so I paid it no mind.

Privacy & Terms