tags:

views:

23

answers:

1

I was stepping through some code and hit a method I wanted to see the code for. I clicked on 'go to definition' and it would usually take me to the method definition, but now it takes me to what appears to be an auto generated [from metadata] class. I've never experienced this before. What's going on and how do I get the old functionality back?

If it helps, the method is being called in a code behind file and the method definition is in the code behind of a UserControl.

+1  A: 

Because the assembly is compiled. You will see this when stepping into a MS assembly. You can use .NET reflector, it is free, to inspect the code.

Dustin Laine
Thanks. What I don't get is, about half an hour ago when I clicked 'go to definition', it would take me to the actual code, but now it takes me the metadata code. I'm not sure what I did to change the behavior. If I choose any other random method in my code and 'go to definition' it takes me to the method's code.
CSharper
Is the code you are trying to go to in the same project? Or is it a referenced assembly?
Dustin Laine
Hi, I'm the OP, diff account. The code is in the same project. I'm trying to get to the code behind of a UserControl from the code behind of an aspx.cs page. The aspx/aspx.cs files are in the root directory, and all usercontrols are in a separate directory in the root.
400_the_cat