Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Other [Possibly solved] Unzipped unity project compiles fine but visual studio is blanketed in red errors.

Discussion in 'Editor & General Support' started by maxkcy, Mar 30, 2023.

  1. maxkcy

    maxkcy

    Joined:
    Oct 11, 2021
    Posts:
    62
    I extracted a project that was zipped up. It runs fine in the editor but it is giving errors for everything in Visual Studio.
    I tried deleating the .vs folder, .csproj, and .sln files, regenerating all the project files, and rebuilding the solution.
    Does anyone know how to fix this?

    upload_2023-3-30_8-32-47.png
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,517
    I've never seen VS fail to recognize good old
    System
    ... wow!

    This may help you with intellisense and possibly other Visual Studio integration problems:

    Sometimes the fix is as simple as doing Assets -> Open C# Project from Unity. Other times it requires more.

    Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

    Barring all that, move on to other ideas:

    https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599/

    Also, try update the VSCode package inside of Unity: Window -> Package Manager -> Search for Visual Studio Code Editor -> Press the Update button

    Also, this: https://forum.unity.com/threads/no-suggestions-in-vscode.955197/#post-6227874
     
  3. maxkcy

    maxkcy

    Joined:
    Oct 11, 2021
    Posts:
    62
    Thanks for replying Kurt. It seems I mistakenly fixed this issue. First off, I had already done the steps described above in my starting post, and this had not resolved the issue.
    This project was created in unity version 2021.3.11f1 and had been upgraded to unity 2023 beta during developement when it was zipped.
    When I re-opened this project, I used unity 2023 beta, which again is the last version this project was using. This is where I had the errors I posted. So I opened it in unity 2021, but once again this produced errors, even more so, there were editor errors with URP and everything was magenta, and the game could not be played in the editor. So I opened it back in 2023. I am guessing that somewhere in this process it seems to have resolved the issue with reimports, back and forth opening of the project.
     
    Last edited: Mar 30, 2023