How can I find all of the solution's assemblies
-
25-09-2019 - |
Question
I'm writing a Visual Studio extension/add-in and I want to find the names of all of the assemblies created from the projects in the current solution.
I don't have any technological limitation - I can use DTE, MEF or whatever else that gets the job done.
Solution
I managed to find an answer - using DTE:
var projects = dte.Solution.Projects;
foreach (Project project in projects)
{
if (project.Properties != null)
{
var assemblyName = project.Properties.Item("AssemblyName").Value.ToString();
}
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow