/ Tools

Rider does not resolve generated code

If you are using protobuf and Rider is not able to resolve generated .cs files in Rider, here is a little bit help.

Where is the generated .cs file

./obj/Debug/YOUR_SDK_VERSION/*.cs

Why is it not resolved

Rider by default does not index obj folder and bin folder so the code inspector fails to find the generated source file in obj folder.

Rider does not seem to have an option to enable indexing for this folder.

Solution

Right click your solution, go to Add->Add Existing Item, find your generated file and add them. They will not be copied to anywhere since they are already in the project path(they are just not indexed). Now you will find out Rider resolves the generated code correcctly. If you check the File System view, you can see that the files just added are being indexed now. Problem solved :)

mimimi

mimimi

Currently a Computer Engineering student at the National University of Singapore, passionate about software engineering. Contact me: info at mimimi.fun

Read More
Rider does not resolve generated code
Share this