function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alexandre Harvey-TremblayAlexandre Harvey-Tremblay 

Save error: invalid cross reference id on class (line 0)

When I click "Save to server", I am getting one error like this for each class.

Save error: invalid cross reference id

I do not use any object by id in the code. Same of the classes are emtpy. I have used "refresh from server" followed by "save to server" multiple times and the list of error appears again.

User-added image
Best Answer chosen by Alexandre Harvey-Tremblay
Alexandre Harvey-TremblayAlexandre Harvey-Tremblay
Solved. Deleting a few apex files caused this issue.

All Answers

Alexandre Harvey-TremblayAlexandre Harvey-Tremblay
Solved. Deleting a few apex files caused this issue.
This was selected as the best answer
Mustafa JhabuawalaMustafa Jhabuawala
Have you deleted the dependent classes ?
Akshay Antrolkar 18Akshay Antrolkar 18
@Alexandre Harvey-Tremblay
Can you please explain how did you solve this error?