Getting Qualified Assembler Class Name in Visual Studio

I am writing a custom reflection library for some specialized custom domain logic, and this library will use XML configuration files that will dynamically resolve System.Type objects at runtime. However, when writing XML configuration files, it is a little painful to write types, because they must be fully qualified assembly names for Type.GetType () to eliminate 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 to a file or standard version or something like that?

+4
source share
3 answers

I'm going to change my comment to the correct answer, because after a quick game, what I suggested does exactly what you want.

Download the free version of Reflector from here , unzip it and run it. Drag the compiled version of your assembly onto it, and next to the Name tag in the information section at the bottom of the dialog box will be its full name, ready for you to simply copy and paste from there.

Please note that all the necessary information is also available by right-clicking on the compiled file, select Properties , then go to the Details tab, although you cannot just copy / paste from there.

+3
source

If I were in your situation, I would just pop up in the Immediate window (Debug-> Windows-> Immediate) and use typeof(TypeFullName).AssemblyQualifiedName .

To do this, you need to qualify a type with a full namespace, and this also has the side effect of automatically starting a project to launch a solution. This side effect can be mitigated by temporarily installing the class library as a project to launch the solution.

Example:

 typeof(System.Windows.Forms.Button).AssemblyQualifiedName 
+4
source

I am not sure if I understood this problem. Do you want to get the full names of your programs programmatically? If so, you can always use typeof(YourType).FullName or typeof(YourType).AssemblyQualifiedName .

I can think of labeling all the types you need with some kind of custom attribute to easily find them in assemblies to extract their names, I don't think you can find some way without going through each from the types you need to extract its name.

0
source

Source: https://habr.com/ru/post/1306522/


All Articles