Visual Studio 2010 Solution Find all References Not Working

11.3k views Asked by At

I have a Visual Studio 2010 Solution that was imported from a Visual Studio 2008 solution that the Find all References does not work on. I've tried doing some searches on Google to try and figure this out but have come up empty handed.

The find all references in VS2008 worked like a charm, we upgraded to 2010 and now no matter what file I'm in the Find All References doesn't return anything.

Anyone have any idea how to possibly fix this or some good ways to "debug" the issue.

5

There are 5 answers

3
Jeremiah On

I figured out what it was. I was still running the Beta version of the Web Deployment Project code template. Just had to un-install it and download the RTW version and everything was fine.

4
Rob Levine On

I haven't come across this specific problem, but I have had a good few odd few Visual Studio behaviours in the past (2005/2008/2010) that were fixed by doing a full reset of all the VS settings.

Occasionally the settings seem to get corrupted and things stop working:

Tools -> Import & Export Settings -> Reset All Settings

A bit of a long shot - but give it a go.

Additionally, this article details the changes in "Find All References" between 2008 and 2010. I'm not sure if this may shed any further light on your issue, but I thought it worth highlighting.

0
CZahrobsky On

Before your reset all of your settings, try this...

I had a similar issue and traced it to missing DLLs in the obj\Refactor folders. I wrote this VB script (which I saved as reff.vbs in one of the folders from my path environment variable) and run it from a command prompt. When "Find All References" or "Refactor > Extract Method" fails, rebuild your solution, then run this:

'' reff.vbs ''
Dim refFile, wsh, objFSO
Set wsh = CreateObject("wscript.shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")  
RefactorFolders "c:\Source" '' Put your root source folder here
Set objOutputFile = objFSO.OpenTextFile("RefreshRefactor.bat", 8, True)
objOutputFile.WriteLine(refFile & "")
objOutputFile.Close
wsh.Run "RefreshRefactor.bat", 1, True
Set wsh = Nothing
Set objFSO = Nothing 

Sub RefactorFolders(strFolder)  
    Set objFolder = objFSO.GetFolder(strFolder)  
    For Each SubFolder in objFolder.SubFolders  
      If Right("         " & SubFolder.Path, 9) = "\Refactor" Then
        Set objBinFolder = objFSO.GetFolder(Left(SubFolder.Path _ 
            , Len(SubFolder.Path) - 8))
        Set files = objBinFolder.Files
        For Each binFile In files
            chk = Right("    " & binFile.Path, 4)
            On Error Resume Next
            If chk = ".exe" Or chk = ".dll" Or chk = ".pdb" Then 
              refFile = refFile & "copy /y """ 
              refFile = refFile & binFile.Path & """ """ 
              refFile = refFile & SubFolder.Path & "\"" "
              refFile = refFile & vbCrLf 
            End If
            On Error Goto 0
        Next  
      End If
      RefactorFolders SubFolder.Path
    Next 
    Set objFolder = Nothing 
End Sub
0
Avinash Ranjan On

May be framework mismatch with your project.

for e.g. suppose your project in F2.0 and VS10 providing it F4.0 reference.

0
Shardak On

I was having this same issue. I found that if you look in the OUTPUT window, change "Show output from" dropdown list to "REFACTOR" and you may see an error that occurred when looking for references.

In my case i was getting "Not enough memory" error related to some bug with Telerik.dll.