Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot resolve symbol 'void'... until Unity Editor is opened #2456

Open
LouisIngenthron opened this issue Aug 9, 2024 · 1 comment
Open

Comments

@LouisIngenthron
Copy link

Description of problem:

From a clean boot, when I open Rider without opening Unity, and I open a unity project in Rider, Rider is unable to resolve any symbols, even built-in language keywords like "void". As soon as the project is opened in the Unity Editor, the problem vanishes.

Expected behaviour:

Rider should be able to resolve symbols and allow the user to work on the code regardless of whether or not the Unity Editor is also running.

Reproduction Steps

  1. Have a pre-existing Unity project available on your drive that uses C# and has csproj's generated
  2. Reboot the computer
  3. Open JetBrains Rider. Open the Unity Project's solution.
  4. Open any code file. See errors throughout.

Known Workaround

Opening the Unity Editor to the same project resolves the issues, but this is not always ideal.

System Specs

Fedora 40
JetBrains Rider 2024.1.5#RD-241.18968.19
Rider Unity Support Plugin bundled 241.18968.19
Unity 2022.3.7f1

@van800
Copy link
Contributor

van800 commented Aug 10, 2024

Hi! It is not a common issue. Should be somehow specific for your setup.
Please attach Rider logs. Either here or create a new issue with Help->Report a Bug, agree to attach logs.

My first idea is that csproj files somehow become invalid after the reboot and Unity updates them on opening the project.
So please try the following:

  1. After the reboot, when Rider shows red code, open the Problems view, check if something is wrong with the toolset.
  2. make a backup of one of the csproj files, which contains a cs file with errors
  3. start Unity, compare csproj with the backup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants