I am in a c# project, in this project I reference (using a project reference) another class library written in vb.net.
Now, when I right click and view definition on the class. It doesn't take me to the exact source code in the vb.net project, instead it takes me to a dynamically generated c# representation of the vb.net class.
I've tried the experiment in reverse, starting with a vb.net project, and referencing a c# project, this time on a right click view definition, it takes me to the code explorer, so again, not the original code for editing.
If both projects are the same language, everything works like nicely.
Is there an explanation for this? And possibly a solution to allow easy code navigation between projects of different languages?
To reproduce:
- Create a blank solution
- Add a c# class library
- Add a vb.net class library
- In the vb.net class library, class1 - create any old method. (optional)
In the c# class, add a reference to the vb.net class, for example:
VBClassLibrary.VBClass myVBClass = new VBClassLibrary.VBClass();
Now, right click on VBCLass and select "Go To Definition".
Notice where you end up....