Sven Zcc
Sven Zcc

Reputation: 133

Visual Studio 2015 "Find All References" only searches opened files

Recently I have Visual Studio 2015 installed (Microsoft Visual Studio Community 2015 Version 14.0.25425.01 Update 3), opened a simple website with it, and found that the "Find All References" only searches opened files.

Everything works fine in Visual Studio 2013 for the same website.

Then I created a new website in Visual Studio 2015, "Find All References" was still not working properly. So I wondering there's nothing to do with my own website, it the Visual Studio's problem.

I've googled it and tried the following:

Sorry for my poor English and Thank you for any help!


Update1. more details about the issue:

By "only searches opened files", I meant, when searching an identifier using Find All References, if files were opened, occurrences of the identifier in the files can be found, or else, the occurrences were ignored.

Say, there are an identifier foo(), and a file callfoo.cs which calls the foo(). Right-click the foo(), select Find All References.

If the callfoo.cs was opened in text editor already, the occurrence of foo() in it can be found, and displayed in the Find Symbol Results window, or else, it returns (0 references).

What's expected is that no matter the callfoo.cs was opened or not, the occurrence of foo() should be found and displayed in the Find Symbol Results window.

Upvotes: 13

Views: 2346

Answers (2)

Jin Ginusuke
Jin Ginusuke

Reputation: 67

I'm also having this problem. As a temporary solution, you may convert it to Web application or try opening it using Visual Studio 2010.

Upvotes: 0

niico
niico

Reputation: 12729

This is how "Websites" work, it is by design.

When creating a new solution, if you go to "New / Project" in Visual Studio - rather than "New / Website" - you will be able to select a project type that is aware of all references.

I do however think that Visual Studio should just do a "manual search" of the current website to find references - that it doesn't is just lazy and inconvenient.

A workaround would be to just search the solution for the name of the method.

Upvotes: 2

Related Questions