Reputation: 48
I have a Visual Studio 2010 C# webforms solution with various projects in it. There is a certain class in one of them that acts strangely. If I open some code in another project and then use the "go to declaration" command to get to the class in question, Visual Studio shows me meta data from the DLL instead. However, if I do the same for another class in the same project (while still using "go to declaration" from another project), I get to the actual code just fine.
Same thing happens when I try to compile. I alter code in this class to no avail, Visual Studio simply doesn't compile the changes. Again only for this one class, all the rest seems to work just fine.
Using "go to declaration" from inside the same project works.
I believe this was caused by our upgrading the solution from .net 3.5 to 4 recently, which brought about a variety of issues that we were able to fix though. This particular issue only seems to exist on my own machine currently, as the code in question is still in development and not checked in yet.
I don't think it matters, but for the sake of completeness: the class in question is an interface.
I've tried "clean solution" and deleted a variety of Visual Studio cache files, nothing seems to have helped so far. Any possible solutions very welcome.
Upvotes: 1
Views: 615
Reputation: 491
It might be a problem with your references - it may be referencing the compiled assembly instead of the project.
Try deleting each reference to that assembly and add them back in as project references.
Upvotes: 1