2

I have a very large solution containing mostly C# projects, a few C++/CLI and Managed C++ projects, and one VB.NET project. However, I am having problems with results that should show up within the VB.NET project when searching for references from a C# project. There are two main issues:

  1. I have a C# project that I know is referenced from the VB.NET project, but it is very large and I am unsure of where the code I need to look at is. If I right click the class name in the C# project and click "Find All References...", it finds all references to the project elsewhere in the solution, but no results show any usage from the VB.NET project. However, I can find any references to the class by using the "Find in Files" function and look for calls to the C# assembly by string. Why is this, and is there a setting I can enable that will tell VS 2010 to search the VB.NET project when finding references from the C# project?

  2. From the VB.NET project, if I right-click a Type and select "Go to definition...", and the Type is defined in a C# assembly, I get the object browser instead of VS opening up the source file containing the class definition.

I have strong a feeling that the causes of these issues are related, so I rolled them into one question instead of two. This issue is somewhat hard to explain well, so if clarification is needed let me know.

TL;DR; Is there any way I can make it so I can find references to a C# assembly in a VB.NET project and jump to a definition present in a C# assembly from a VB.NET project?

1
  • I work with a large solution that is mixed VB.net and C#. We have the same trouble. The developers have learned that Find in files works and Find all references doesn't. Aug 26, 2013 at 18:42

1 Answer 1

5

Unfortunately this is simply a limitation of Visual Studio. The individual language services (VB.Net, C# and C++) don't talk to each other in any way. References between projects of different languages are seen exactly the same way that references to binaries on disk are. There is no source inspection between languages and hence you get the behavior you see

1
  • That's what I've been told, but I swear that this used to work in a prior version... perhaps I'm just crazy haha
    – codewario
    Aug 26, 2013 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.