Search Unity

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

Discussion in 'Scripting' started by HeyBishop, Aug 16, 2021.

  1. HeyBishop

    HeyBishop

    Joined:
    Jun 22, 2017
    Posts:
    238
    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.

    upload_2021-8-15_22-18-1.png

    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!
     
  2. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    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.
     
    HeyBishop likes this.
  3. HeyBishop

    HeyBishop

    Joined:
    Jun 22, 2017
    Posts:
    238
    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.
     
    Vryken likes this.