Reputation: 12580
I want to list the assemblies in my solution, but only those which are projects in my solution rather than just a list of loaded assemblies as would be returned by AppDomain.CurrentDomain.GetAssemblies();
Is there a class that gives me run time solution information? Ideally I'm looking for something like Application.GetSolutionProjects();
Project is VS2008/C#/.Net 3.5
Thanks
Upvotes: 1
Views: 546
Reputation: 22555
Solution file is just for VS, It's not a part of .net framework, and it not include in projects, i.e you can have one project and multiple solution which contains this project, you want fetch what solutions project? But, You can parse specific solution file to get all projects in the solution
Upvotes: 1
Reputation: 4939
The application is actually separate to your solution. You could parse the solution and project XMLs to generate a list of assemblies created by your solution.
I'm not sure how you'd do this at runtime as the solution and project files wouldn't generally be available. You could precreate a list at compile time, then have a method read it. Or you could dump your assemblies into a specific subdirectory at compile time, and just examine that directory to list your assemblies at runtime.
Upvotes: 1