"go to definition" problem. What changed?

  • Thread starter Thread starter Fred Hebert
  • Start date Start date
F

Fred Hebert

I was thinking of switching to VS2005, so I sent off for and received a 120
evaluation kit. This version was supposed to be the same as the full
version, but the key limits you to 120 days. I installed it and began
learning how to use it.

I built several small C# test apps that use common classes in a dll that I
also wrote. When I right click on a class that was defined in the dll and
select "go to definition" it would open the source file from the dll
project. Great!

I decided to buy VS2005... After installation of the purchased version the
"go to definition" doesn't work the same way. It always opens a meta data
fragment. In most cases I am more interested in my comments in the actual
source, or something near the item I right clicked on.

According to the docs VS does this when it can not find the source. I
don't quite understand this because I am opening the SAME solutions that
were created with the eval version and everything looks the same.

I have tried adding the dll to the current solution, not just the
reference, but I still won't find it. Even if I have the source file open
in another tab.

If I right click on a class or variable in the "other tab" and select "go
to definition" where the definition is elsewhere in the same file I get a
runtime error and VS closes!

If I run my app, I can trace into the actual source of the dll, so why cant
the "go to reference" find it?

This is very annoying.

Can anyone help?
 
Hi,

If it does do that is cause it has no knowledge of where the source code is.

You can include the other's prject in your solution and it will work as
expected.
 
Not to be picky, but I have already tried that...
According to the docs VS does this when it can not find the source. I
don't quite understand this because I am opening the SAME solutions that
were created with the eval version and everything looks the same.

I have tried adding the dll to the current solution, not just the
reference, but I still won't find it. Even if I have the source file open
in another tab.


Initially I created the DLL as a stand alone solution.

Next I created a new Windows Form solution. I added a reference to the
DLL (Add Reference>Browse and double click on the actual dll). I got
this from an example...

I added a using MyDllNamespace statement and created some instances of a
couple of the classes in the dll.

Compiled and ran, all OK, and I could just right click and "go to
definition" and it would take me to the actual source in the dll
project.

After install of the full version, I open the SAME Windows Form solution
that was previously created and the "go to definition" gives me
metadata.

I tried to Add Existing Project to the solution and add the dll project,
but it did not fix the metadata problem.

I am new to VS (but not programming). What am I missing?

If it matters it is VS2005 pro...
 
Fred Hebert said:
Initially I created the DLL as a stand alone solution.

Next I created a new Windows Form solution. I added a reference to the
DLL (Add Reference>Browse and double click on the actual dll). I got
this from an example...
Compiled and ran, all OK, and I could just right click and "go to
definition" and it would take me to the actual source in the dll
project.

I'm not sure, why this works. I wouldn't expect this.
After install of the full version, I open the SAME Windows Form solution
that was previously created and the "go to definition" gives me
metadata.

I tried to Add Existing Project to the solution and add the dll project,
but it did not fix the metadata problem.
I suppose you still linking to the dll instead of the project.

Remove the reference, and then choose add reference and select the dll
project from the projects tab. That should work.

HTH
Christof
 
BINGO!

Thanks.

Sometimes it's the little things...

I am not sure why the other worked either. The eval version did have
some other stuff like team source and other things. The version I
bought was the Professional, not the enterprise...

I am just glad I have a solution, because I use that al lot.

I am developing/comverting a large app with 17 variants and putting the
common code in the dll. So I am sort of building both projects in
parallel and go back and forth a lot.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top