5

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.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Jeremiah
  • 91
  • 1
  • 1
  • 4

5 Answers5

4

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.

Jeremiah
  • 91
  • 1
  • 1
  • 4
  • Voting this up - I had the same issue, and also had beta Web Deployment Project installed. This is a good thing to check when having issues: Do you have any beta or outdated plugins installed? – ViNull Jul 15 '10 at 14:12
  • 2
    RTM Release can be found here: http://www.microsoft.com/downloads/details.aspx?FamilyID=89f2c4f5-5d3a-49b6-bcad-f776c6edfa63&displaylang=en – DilbertDave Aug 12 '10 at 09:19
  • Is "Web Deployment Project" the same thing as "Web Deploy 2.0"? I am having this problem at the moment and it is very annoying – Mark Heath May 17 '11 at 16:14
2

May be framework mismatch with your project.

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

Nayan
  • 3,014
  • 2
  • 17
  • 33
Avinash Ranjan
  • 180
  • 2
  • 11
1

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.

Shardak
  • 11
  • 1
0

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
CZahrobsky
  • 762
  • 7
  • 7
0

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.

Rob Levine
  • 40,328
  • 13
  • 85
  • 111
  • So - if you create a really simple c# project with two types, where one references the other, then "find all references" won't work, even in this simple case? – Rob Levine Jun 18 '10 at 15:46
  • Yes, created a simple project with two classes, one referencing the other, then did a find all reference and it returned both reference to the function I created and used. – Jeremiah Jun 18 '10 at 16:11
  • so it does work in this simple case - but not on the converted solution? How many projects are there in the solution? If it is a small number (say 1-10), is it worth deleting the solution file and project files, and recreating these all in VS2010? – Rob Levine Jun 18 '10 at 16:25
  • 15 Projects. That is one of our options, I'm assuming it is an issue with a reference or the way it converted one of our projects. Just haven't narrowed it down. I was hoping someone else ran into this issue that might have a good way of doing that narrowing. :) – Jeremiah Jun 18 '10 at 16:46