3F / MvsSln

🧩 Customizable VisualStudio .sln parser with project support (.vcxproj, .csproj., …). Pluggable lightweight r/w handlers at runtime, and more …
MIT License
140 stars 27 forks source link

Getting projects *in build order* from .sln #60

Closed DynConcepts closed 6 months ago

DynConcepts commented 11 months ago

Is there any pre-existing code that will take a solution file, a configuration/platform, and return all of the projects to be build -- in the correct order?

3F commented 11 months ago

Hello,

The order depends on your actual goal. If you need to consider dependencies in attempt to construct list of records for correct build, yes, of course, MvsSln helps in this way with the ISlnPDManager and ISlnProjectDependencies

https://github.com/3F/MvsSln/blob/8d847f0f15622107663111ec4d423fed50f71b78/MvsSln/SlnItems.cs#L58-L60

Specific implementation should be provided automatically (you don't need to do anything else) same together with SlnResult if applied ProjectDependencies

https://github.com/3F/MvsSln/blob/8d847f0f15622107663111ec4d423fed50f71b78/MvsSln/Core/SlnResult.cs#L121-L124

Using ISlnPDManager is very easy but here you can find full example in real project. There we discussed various cases that can affect on projects build and their dependencies.

Let me know if this doesn't fit the issue.

3F commented 6 months ago

I close the issue. Please provide further details if the problem still exists.