Take the 2-minute tour ×

I have a C# project in VS 2005, with a reference to Foo.dll, a library of C++ .NET code, at c:\Foo\Foo.dll. It shows the reference in the Object Browser properly, but for a given object + method, I can't figure out how to navigate to the source for it inside of Visual Studio.

I've built Foo.dll myself from source on my local machine, and Foo.pdb is in the same location as Foo.dll, at c:\Foo\Foo.dll.pdb. I don't have a project for Foo in the solution I'm working within.

Looking at a stack trace from my C# app, I can see that it knows exactly where the source is on my system - I see a line that looks like:

at mycompany.Foo.SomeClass.SomeMethod() in c:\src\foo\src\SomeClass.cc: line 123

This is the right location for that source file, but I can't figure out at all how to easily have VS open SomeClass.cc. Does Visual Studio require that Foo be setup as a project in my solution in order to easily navigate to the source code?


share|improve this question

2 Answers 2

Can you include the project in the solution and build by 'project reference'?

share|improve this answer

Is your application loading Foo.dll from the patch c:\Foo\Foo.dll? I'm guessing you actually have a copy of the dll in your application's bin folder. If that's the case, the .pdb file will need to be in the same location. Once you do that you should be able to step in to the code - Visual Studio should prompt for the code location.

One other thought - Under Tools > Options, look at the Debugging section. Under the General sub-section, see if "Enable Just My Code (Managed only)" is checked. If it is, uncheck it and then try to debug.

share|improve this answer

Your Answer


