0

I am having difficulty with Find All References feature in Visual Studio 2017 (and 2015 at least, may be older too). I have this defined in one project (C#):

public static class AlgorithmNames
{
    public static readonly string
        FaceAnalyzerAlgorithm = "Face Analyzer Algorithm (C++)",
        StaticFaceAnalyzerAlgorithm = "Static Face Analyzer Algorithm (C++)";
}

and it's used in another project (C++/CLI) in the same solution like so:

public ref class FaceAnalyzerAlgorithm : AlgorithmBase
{
public:     

    property String^ Name
    {
        String^ get() override { return AlgorithmNames::FaceAnalyzerAlgorithm; }
    };
...

When I right click Find All References on the definition of FaceAnalyzerAlgorithm (C#) it does not find the use just the definition even though the filter says "Entire Solution".

enter image description here

When I right click Find All References on the use (C++/CLI) it finds nothing and nothing happens in UI to indicate any activity. Go To Definition and Go To Declaration both end up in Object Browser.

Issues like this do not seem to happen when it's just C#, but as soon as there is C++ it fails miserably. Any fixes or workarounds welcome.

ILIA BROUDNO
  • 1,539
  • 17
  • 24
  • With VS2015 at least, it seems that certain features simply don't work on C++/CLI code, like a fair amount of debugging features. So it doesn't surprise me that the Find All References doesn't work either. But when you need to find stuff, Grep is Always Your Best Friend. VS supports text searches right from the IDE, with many nice options, so you don't actually have to break out to the cmd line. – Chris O Nov 16 '17 at 22:14
  • it all kinda looks and feels the same, but this is code maintained by very different teams inside Microsoft, using vastly different codebases. The IntelliSense parser wasn't even written by Microsoft. Done by EDG, a company that is famous for their front-end C++ parsers. Them not having to know how the C# group does their job and worry about constant change (like Roslyn) is very much a feature and not a bug. – Hans Passant Nov 16 '17 at 22:59

0 Answers0