简体   繁体   中英

Entire Solution Search is not working in Visual Studio 2017

Recently switched over to VS2017 from VS2015, found that Entire solution search is not working. VS 2017 Provides results from previously opened or checked out files. Am I missing any setting or configuration?

VS2015 Search Screenshot , VS2017 Search Screenshot

Glad that found solution,

Solution Explorer -> Right click on solution -> Disable Lightweight Solution Load

Screenshot

Update for 2021

Microsoft deprecated Lightweight Solution Load as of Visual Studio 2017 15.5, so the accepted answer no longer applies for anybody using newer versions of VS2017.

This bug also affects Visual Studio 2019 , and is happening on everybody's Visual Studio 2017 15.9 installation where I work, so I find it curious more people haven't reported it.

Solution

To ensure the Find tool does, genuinely, search through the entire solution, simply expand every project in the Solution Explorer , so you can see their contents.

Alternatively, you need to ensure every file to be searched is already open in the main pane of Visual Studio, but for solutions with many files this is obviously not realistic and in any case involves opening the project in the Solution Explorer first.

Why does this work

It seems Visual Studio isn't parsing the files for use by the Find tool until they have been touched by the user after loading the solution. Since this is happening in VS2019 as well, it looks like whatever method they replaced Lightweight Solution Load with is not doing this automatically when the solution is loaded.

It's still working with me. Please double check again in Find options like (Match case, Match whole word, Use regular expression). Select Entire Solution ( Including External Items ) may also is what you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM