The solution 'ProjectName' has been modified outside the environment.

I’ve been getting the following error message from time to time when switching from Unity to Visual Studio. (And by “from time to time”, I mean, I can’t reproduce this error on a consistent basis.)

Whether I press Reload or Ignore, the result is - some classes become unknown, even though I am including the requisite namespace above.

The only solution I’ve found to resolve this is by exiting Unity and deleting the project’s Library folder. That solution SUCKS because it needs to rebuild the next time I launch Unity, which can take more than 15min!

Not sure what might be the cause of this issue, but have you tried navigating to:
Edit > Preferences > External Tools > External Script Editor and selecting the “Generate all .csproj files” option to rebuild your project files?

If that works, it’s at least a faster solution than deleting the library folder.

1 Like

THAT DID IT!!

I am so thankful. I can’t tell you how many hours this has cost me. No more!
Thank you, thank you.

1 Like