Source file could not be found - Unity 2018.2

I upgraded to Unity 2018.2. Since then I can not debug anymore. The reason for this is, that the visual studio project lists files, that are not available on the hard drive.
120686-capture.png
The errors look like this:


Do you have any Idea, how I can get rid of these errors? In the Editor Console everything looks fine, the scene is completly playable.

For me a single file was missing; which was 1 file I deleted because it was not used anywhere. When I got this error, I created the file (in my case it was a c# script) in the location where Unity was complaining about not finding it. Then the compile worked fine. After running the game in play mode I deleted the file from inside Unity and everything worked again.

Hi
i hope all of above answers may work for someone but i didn’t got success on all and using mono so Visual Studio not my issue.

i solved by minimizing my project name directory means shrink my project name, no tested directories.

Like 

E:\Updates\Virtual Police Dad game New Project etc.0.13_Unity.2017.4.6.f1\Virtual Police Dad game New Project etc.0.13_Unity.2017.4.6.f1\Assets\Invector-3rdPersonController\Basic Locomotion\Scripts\XInput\Plugins

to

"E:\Updates\VirtualDad\VirtualDad\Assets\Invector-3rdPersonController\Basic Locomotion\Scripts\XInput\Plugins "

If anymobdy ist interested:
_

  1. Go ahead close the project & Visual Studio
  2. Delete the Temp folder in your unity project folder
  3. Delete C:\Users[User]\AppData\Local\Microsoft\VisualStudio
  4. Delete C:\Users[User]\AppData\Local\Microsoft\VisualStudio Services
  5. Delete C:\Users[User]\AppData\Roaming\Microsoft Visual Studio
  6. Restart everything
    _
    If this does not help. Repeat 1.-5. and reinstall Visual Studio.

For me running the Visual Studio Installer and using it to Update Visual Studio to the newest version worked.