开发者

Visual Studio Find All References and Refactoring Stopped Working

开发者 https://www.devze.com 2023-01-12 15:15 出处:网络
I am working with a fairly complex solution in Visual Studio 2008.It contains 2 Web Applications, 5 class libraries, a console application a msi setup project, these are all written in c#.The long and

I am working with a fairly complex solution in Visual Studio 2008. It contains 2 Web Applications, 5 class libraries, a console application a msi setup project, these are all written in c#. The long and the short of it is that Find All References, Find Symbols and some parts of Refactoring do not work anymore. I needed to investigate why a property on one of the classes in a class library was not being set when it should have been. So i did a find all references and it found only some of the references, only the ones within the project that contains the class in question. I know for a fact that there are a bunch in one of the web application. When it is doing the search, I can see that it is searching ALL the projects in the solution. I get the same problem when i do a find symbols and if i try to use the rename function of the refactoring. I can work around these lim开发者_StackOverflow中文版itation by using standard find and Replace, or by commenting out the relevent section of code and picking through the post build errors. It seems to be solution related as it also happens on my coleagues copy of visual studio for the same solution. It is not limited to a particular property or class, it seems to happen all over the place. The only consistency is that it only ever seems to fins references within the project that they are declared. A good example of this is that i can locate a reference within the web app right click and say find all references and if the it returns 0 results, i.e. it doesn't even find the reference i right clicked on.

tl;dr Find All References only finds references withon the project that they are declared.

If anyone can point me in the right direction with this that would be very helpful.


How much memory do you have on your machines - try increasing your RAM. I had suffered such issues earlier and they vanished when I increased my memory.

Another suggestion would be to create two solutions - one with everything and other (working solution) with stuff needed - for example, you can exclude setup project - just takes too much time for loading/building. You will find the trimmed solution to be far responsive than complete solution. When you are generating build, use complete solution.


Bit obvious this, but Find All References can stop working if you have a compile error.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号