Cannot open source file in Visual Studio IDE

Questions about YourKit .NET Profiler
Post Reply
DJarrin
Posts: 15
Joined: Thu Mar 08, 2007 3:31 pm

Cannot open source file in Visual Studio IDE

Post by DJarrin »

No matter what I try, the "Open Declaration in Visual Studio" never opens the selected class in the IDE.

Here's the entry from the log,

[YourKit Profiler 2.0.3 for .NET] VS Plugin connected
[YourKit Profiler 2.0.3 for .NET] System.Runtime.InteropServices.COMException: A namespace may exist in multiple projects so it is not possible to retrieve the name through the ProjectItem
at EnvDTE.CodeElement.get_ProjectItem()
at YourKit200703092021.VSPlugin.tryToShow(CodeElement codeType)


I do not have repeated namespaces in multiple projects. I do have multiple projects on my Solution, but the namespaces are different across projects. Also, the namespaces may not match exactly the name of the project, for example:

My class "TabControl" has the namespace Company.Product.Application.WinForms and the project name is "Controls".

One thing to consider is that I am using Visual Studio "Solution Folders" to organize different projects in separate "Solution Folders." I have done some Visual Studio DTE programming and know that the DTE API may not handle "Solution Folders."

I would suggest you attempt to find the source file to open through inspecting the .PDB file as other products do.

I really hope you can come up with a workable solution in the near future.
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

Please send us complete log file (from %USER_HOME%\.ynp\logs directory) to support(at)yourkit.com. It will help a lot to investigate and fix the problem. Also it will be _very_ helpful if you send us some test demo VS-project which reproduces the problem.

Thank you in advance.

Sincerely,
Vladimir Kondratyev
YourKit, LLC
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

We've managed to reproduce the problem. The bugfix release 2.0.6 will be available for download today.

Best regards,
Vladimir Kondratyev
YourKit, LLC
http://www.yourkit.com
"Don't get lost in data, get information!"
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Build 2.0.6 is available for download at http://www.yourkit.com/dotnet/download/
Chris C
Posts: 2
Joined: Tue Apr 10, 2007 3:19 pm

Post by Chris C »

Hi,

just dowloaded the latest version today, which generally speaking, looks good...

I seem to be having the same issue regarding source control integration, I've looked at the logs in the folder you mentioned, nothing in there apart from messages saying that the session has started/stopped.

The normal solution I use is large, having many folders and projects, I've created another solution with just the application in it, I still get the same problem.

Is there anything else I should be looking at?

Thanks,

Chris
Chris C
Posts: 2
Joined: Tue Apr 10, 2007 3:19 pm

Post by Chris C »

Just realised a slight typo - I meant source code integration, as opposed to source control integration!
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

Hello Chris,

Please provide more information about the code you are trying to open (exact type name or method name or field name etc). How many projects does your solution have?

Best regards,
Vladimir Kondratyev
YourKit, LLC
http://www.yourkit.com
"Don't get lost in data, get information!"
Post Reply