Hello @Davies, Myles ,
Thank you for taking time to post this issue in Microsoft Q&A forum.
I think we need to check from following three aspects:
1). If the code elements are referenced in other folders(“really exist outside of the current files” as you mentioned).
2). If there are some settings or options that may not choose or set well when using “Find all references” and “Go to definition” features.
3). If VS IDE or some of VS settings are broken on your side.
Firstly, you should make sure that the codes are really referenced in other files, folders or projects. You can try to “Find all references” for other codes or if possible, I think create two files in different folders, with some JS codes to make sure the references really exist maybe a better way.
Secondly, you need to check if you have selected the “Entire Solution” scope for “Find all references” feature.
Thirdly, If you didn’t perform some other operations and the codes, files and the folders were added into your solution by following the standard add
process, then you can check the third aspect, please follow steps below.
1). Try to Build > Clean Solution and then restart VS and use “Find all references” feature again.
2). Close all VS instances and go to solution folder then delete the “bin”, “obj” and the hidden “.vs” folder, restart VS and check again.
3). Repair and update VS to the latest version.
4). Try to reset settings of VS. Follow this document: Reset settings and remember to select “General” at step 4.(If needed, please export your current settings and then reset it)
Besides, if you try to create some new projects and test in a new solution, if this issue appears again, you can share us the reproducible steps and related codes(screenshots). And this will be useful for us to check and narrow down your issue.
Best Regards,
Tianyu
- If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.