Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Unity 2021.3.4f1 doesn't generate csproj files. Can't regenerate them either.

Discussion in 'Editor & General Support' started by Nukeyfox, Jun 10, 2022.

  1. Nukeyfox

    Nukeyfox

    Joined:
    Jun 10, 2022
    Posts:
    2
    Hi,

    I just installed Unity Hub and Unity 2021.3.4f1.
    I was having the problem where it says the project has compilation errors and I need to Enter Safe Mode.
    One fix that I saw online was to go to Preferences -> External Tools and click "Regenerate csproj files".
    However I don't have that option.

    I thought it was because it didn't recognise Microsoft Visual Studio at first. But after installing it and then setting it to the External Script Editor (as in the picture). The option for "Regenerate csproj files" does not appear.
    I have tried setting editors but they give the same problem as well.
    On inspection of the project files, it doesn't seem like any csproj (nor sln) files were made in the first place.

    Any ideas how to fix this?
    Thanks!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,951
    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. Nukeyfox

    Nukeyfox

    Joined:
    Jun 10, 2022
    Posts:
    2
    Thank you for your reply.
    I have tried the Open C# Project, but that was unsuccessful. I clicked it and I waited for almost 10 minutes without anything happening. No pop up window or an error message.

    I could not find where the userprefs and .vsconfig was stored, so I might need guidance for that.

    For the post in that link, I can't do that because, well, I don't even have the "Regenerate csproj files" button as can be seen in the screenshot.

    My Visual Studio Editor is up-to-date, so that is not an issue.

    I have yet to try the last one. The installer linked on the post seems sketchy so I haven't dared to carry through with it.