Search code examples
c#visual-studiodebuggingunity-game-enginevisual-studio-debugging

"Unable to step. There was a pr0blem reading metadata.." when debugging Unity app in Visual Studio


I'm currently using Visual Studio 2013 and the Visual Studio Tools for Unity extension in order to debug my game written in C#.

However, randomly I've started getting the following error whenever I try to start stepping in the debug:

"Unable to step. There was a problem reading metadata from '\obj\Debug\Assembly-CSharp-Editor.dll' ('The system cannot find the file specified.') IntelliSense may not work properly until the solution is reloaded."

However, when I check, the file is there and seems to be perfectly fine.

Any ideas to what is causing this/how I should go about fixing it?

Thanks!


Solution

  • It appears that when using Visual Studio Tools for Unity, opening VS through the "Open in Visual Studio" option at the top in Unity causes the error. This is likely a bug.

    The workaround I've found is to open Visual Studio as its own program outside of Unity and open the project files through that. That appears to avoid the problem.