How to programmatically load the list of assemblies that opens in the Framework tab VS Framework tab

and how to load the list of assemblies that is displayed on the Extensions tab VS Exstensions tab

    1 answer 1

    Well, as I understand it, the task is to find these dlls and get them, in one case, all with the System marker, and in the other Microsoft. VisualStudio, in general, these files are copied to the GAC. From there I would get them like this

    static class Program { private static string WindDir = "C:\\Windows\\Microsoft.NET\\assembly\\GAC_MSIL"; private static string ExtensionSystem = "C:\\ExtensionSystem"; private static string ExtensionVS = "C:\\ExtensionVS"; static void Main() { string[] directorys = Directory.GetDirectories(WindDir); Directory.CreateDirectory("C:\\ExtensionSystem"); Directory.CreateDirectory("C:\\ExtensionVS"); GetSystemExtension(directorys, "System.", ExtensionSystem); GetSystemExtension(directorys, "Microsoft.VisualStudio", ExtensionVS); } private static void GetSystemExtension(string[] directorys, string extension, string targedFolder) { foreach(string dir in directorys) { if ((dir.Contains(extension) && !dir.Contains("ProjectSystem") && !dir.Contains("TypeSystem") && !dir.Contains("TeamSystem")) && !dir.Contains(".resources") ||( Path.GetFileName(dir) == "System")) { string[] directorySystem = Directory.GetDirectories(Path.Combine(WindDir, dir)); string[] files = Directory.GetFiles(directorySystem[0]); File.Copy(files[0], Path.Combine(targedFolder, Path.GetFileName(files[0]))); } } } } 

    As far as I understand this is true only for the version from .Net 4.0

    • In this case, it also pulls the resource assemblies: .resources, but they are not needed - user2455111
    • one
      I adjusted the resources, but the principle will remain the same anyway, you yourself can make the necessary conditions. - Yury Bakharev
    • And if, for example, additional components like DevExpress will be installed in the system, will this change the filter again? - user2455111
    • one
      Well, not to change, but to add, DevExpress is also registered in the GAC. Create another folder under DevExp and pass in the parameter "extension" - "DevExpress.", And in the targetFolder - the folder you created under DevExp - Yury Bakharev