Bug 6665 - Find references doesn't find any references when right-clicking on a static field inside a static ctor
Summary: Find references doesn't find any references when right-clicking on a static f...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2012-08-23 15:54 UTC by Andres G. Aragoneses
Modified: 2012-08-28 02:07 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Andres G. Aragoneses 2012-08-23 15:54:30 UTC
Steps to reproduce:

1. Open MonoDevelop master inside MonoDevelop master.
2. Go to file SoftDebuggerSession, line 2153.
3. Right click on any of the fields initialized in the static ctor: IsWindows, IsMac, PathComparer, => Find References.

Current results: zero.
Expected results: more than zero.
Comment 1 Andres G. Aragoneses 2012-08-23 15:56:23 UTC
And I think this exception I got in the console was related:

ERROR [2012-08-23 20:55:25Z]: System.ArgumentNullException: Project not set.
Parameter name: project
  at MonoDevelop.CSharp.Refactoring.CSharpReferenceFinder.FindReferences (MonoDevelop.Projects.Project project, IProjectContent content, IEnumerable`1 possibleFiles, IEnumerable`1 members) [0x0033d] in /home/knocte/Documents/code/monostuff/monodevelopLAST/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Refactoring/CSharpReferenceFinder.cs:271 
  at MonoDevelop.Ide.FindInFiles.ReferenceFinder+<FindReferences>c__Iterator20.MoveNext () [0x003f5] in /home/knocte/Documents/code/monostuff/monodevelopLAST/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/ReferencesFinder.cs:221 
  at MonoDevelop.Refactoring.FindReferencesHandler+<FindRefs>c__AnonStorey14.<>m__1B (System.Object ) [0x00036] in /home/knocte/Documents/code/monostuff/monodevelopLAST/main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring/FindReferencesHandler.cs:48
Comment 2 Mike Krüger 2012-08-28 02:07:05 UTC