Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mixing C# and VB.NET projects = broken "Go to definition"

I have a large-ish solution, with C# and VB.NET projects mixed. Whenever I try to “Go to definition” on a class, property or method that’s defined in the other language, Visual Studio just takes me to the Object Browser, which is pretty annoying. Same for debugging: I can’t step into a project that's written in the other language.

Is there a way to fix this?

like image 814
Jakob Gade Avatar asked Aug 11 '11 20:08

Jakob Gade


People also ask

Can I mix C++ and C?

If the C++ compiler provides its own versions of the C headers, the versions of those headers used by the C compiler must be compatible. Oracle Developer Studio C and C++ compilers use compatible headers, and use the same C runtime library. They are fully compatible.

What is extern C used for?

extern "C" specifies that the function is defined elsewhere and uses the C-language calling convention. The extern "C" modifier may also be applied to multiple function declarations in a block. In a template declaration, extern specifies that the template has already been instantiated elsewhere.

Is C or C++ faster?

Performance-based on Nature Of Language C++ language is an object-oriented programming language, and it supports some important features like Polymorphism, Abstract Data Types, Encapsulation, etc. Since it supports object-orientation, speed is faster compared to the C language.


2 Answers

I have this problem too. As workaround I use Navigate to (CTRL + comma) instead of Goto Definition.

like image 59
Dirk Brockhaus Avatar answered Oct 16 '22 23:10

Dirk Brockhaus


See this seems like a reported bug

Find all references / go to definition do not work across VB/C# in same solution.

Quote:

The project-to-project reference between a C# and VB project is treated like a file assembly reference where all symbols are treated as if coming from metadata.

like image 23
Haris Hasan Avatar answered Oct 16 '22 23:10

Haris Hasan