I'm writing a customized reflective library for some specialized custom domain logic, and that library is going to use XML configuration files that will dynamically resolve System.Type objects at runtime. However, when writing the XML configuration files, it's a bit of a pain to write the types because they need to be fully qualified assembly names for Type.GetType() to resolve them. Is there a way to find out the AssemblyQualifiedName of an object in Visual Studio without resorting to writing a program to print them out to a file or standard out or anything like that ?
If I were in your situation I would just popup the Immediate Window (Debug->Windows->Immediate) and use typeof(TypeFullName).AssemblyQualifiedName
.
You need to qualify the type with the full namespace in order to do this and this also has the side effect of automatically running the solution startup project. This side effect can be mitigated by temporarily setting a class library as the solution startup project.
Example:
typeof(System.Windows.Forms.Button).AssemblyQualifiedName
I'm gonna change my comment to a proper answer, because after having a quick play what i suggested does exactly what you want.
Download the free version of Reflector from here, unpack it and run it. Drag and drop a compiled version of your assembly on to it, and next to the Name tag in the info section at the bottom of the dialog will be its fully qualified name, ready for you to just copy and paste from there.
Note that all the info you need is also availableby right-clicking on the compiled file, select Properties, then go to the Details tab, although you can't just copy/paste from there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With