Is there a way within Visual Studio to easily get qualified type names?
Asked Answered
T

3

13

I'm looking for an extension/process for getting an object's assembly qualified type name within Visual Studio. I'm aware that you can write a quick console app to output this but find it to be a clumsy process. Ideally, I'd like the ability to right-click on a type name, and have the option to copy it's assembly qualified name to the clipboard in order to paste into my DI Container's configuration file.

Timotheus answered 19/12, 2011 at 19:46 Comment(5)
@JohnSaunders:No There is no Definition when you not write using.I think he wants to find assembly/namespace of an object when he don't know what are them.Brominate
Wasn't sure. I use ReSharper, and I would simply click the type, then type Control-B.Silver
Maybe something like RedGate .Net reflector would help. The built in object browser may be an option as well but I'm not seeing the full name of the assembly in the object browser.Huttan
Posted a decent answer over at a similar question: https://mcmap.net/q/909218/-vs-add-on-to-copy-full-type-name-of-identifier-under-the-cursor-into-clipboard-closedSubcontraoctave
There is a great answer: https://mcmap.net/q/909219/-how-to-get-fully-qualified-assembly-nameDolf
W
3

In newer versions of ReSharper you can use the ReSharper/Edit/Copy Fully-qualified name/ Source browser URI to clipboard menu option.

Wampler answered 19/5, 2017 at 9:0 Comment(0)
L
2

Assembly Information is probably close to what you are looking for. It seems to only show information on your references but should't be a problem if you have another project in your solution referencing the assembly.

Good idea for a plug-in if it's possible.

Luzluzader answered 22/12, 2011 at 17:42 Comment(3)
Thanks. That plug in is very close to what I need. Unfortunately, I'm not having any luck with getting the actual assembly information dialog to appear in my solution. Maybe the maturity isn't there yet for this project?Timotheus
Interesting, I haven't had any problems with it. Are you trying to view the assembly information of the project? It doesn't come up that way. Select 'Assembly Information' on the reference to the project in the References folder and it comes up for me. But you're right, it would be ideal if you could just view the information at the project level.Luzluzader
Okay, I see what it does now. I was a confused because the "Assembly Information" option is always in the context menu in Solution Explorer. I might look at the source to see how it's done this weekend and if something closer to what I need can be accomplished.Timotheus
R
-4

Try using Productivity Power Tools. Its free and provides a whole slew of other great extension for Visual Studio.

http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef

Repel answered 19/12, 2011 at 20:15 Comment(1)
Can you elaborate? I do use this extension but have not found a feature which lets me obtain qualified type names.Timotheus

© 2022 - 2024 — McMap. All rights reserved.