Can not resolve symbol

I just started developing Rider in C#. I don't understand why the files in the project do not see each other. I will be grateful if you could help me. Here is my upload ID: 2023_08_22_mWYf2HQrzPyALWhqXubr6c 

0
1 comment

Hello Sevilayceker,

Thank you for contacting Rider support.
Indeed, it is not obvious how to make ANTLR generator work.

Please find the following tips. Hope it helps:

  • Install the ANTLR v4 plugin in Rider. Restart Rider;
  • My path to .sln file is: /Users/Dmitrii.Kazantsev/Downloads/firstAntlr/firstAntlr.sln
    I made antlr sources to be generated in /Users/Dmitrii.Kazantsev/Downloads/firstAntlr/Gen/Tiny folder using the following config: 
    So, you would need to choose {PathToFolderParentToFolderWithSolution} as an Output directory; Also set the namespace for the generated code like firstAntlr.{DesiredFolder}.Tiny. Do not forget to set the CSharp as a language;
  • When you configured these settings, open the .g4 file;
  • Select Tools | Generate ANTLR Recognizer. It should generate sources under {SolutionFolder}.{DesiredFolder}.Tiny;
  • Likely still there will be "Can't resolve symbol errors". I suggest deleting all the entries from the packages.config file and installing only necessary NuGet from the NuGet tool window. Delete entries from packages.config, save a file and open the NuGet tool window;
  • Find the Antlr4.Runtime.Standard (It contains required symbols) NuGet and install it;
  • If still there are errors, try restarting Rider;

Feel free to try out the solution I prepared based on yours. It builds and runs fine: https://uploads.jetbrains.com/files/2023_08_23_Bkq2bqyfs6ZiaTgkXnpcdZ_JBS/firstAntlr_working.zip?secret=9XmB5mCqJAnD31bJC7Ez7Gs428BAFfgh

If that doesn't help or you have any other questions or difficulties, please let me know.
Have a nice day!

 

0

Please sign in to leave a comment.