3F / MvsSln

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

Handlers for `NestedProjects` when solution folders #7

Closed 3F closed 5 years ago

3F commented 5 years ago

This feature is related to the Issue #6

raw overview:

Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MyFolder1", "MyFolder1", "{6089ABB0-C1B3-4104-A422-DF223328B81C}"
EndProject

^

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bridge", "Bridge\Bridge.csproj", "{73919171-44B6-4536-B892-F1FCA653887C}"
EndProject

^

GlobalSection(NestedProjects) = preSolution
    {73919171-44B6-4536-B892-F1FCA653887C} = {6089ABB0-C1B3-4104-A422-DF223328B81C}
EndGlobalSection

I've plan to consider this issue in the current month. But anyone else may also help to add this r/w handlers.

3F commented 5 years ago

As I thought before, it was trivial task for our MvsSln :) About 10-12 lines of code for new logic via LNestedProjects (reader) and WNestedProjects (writer).

NestedProjects section now fully integrates data into existing information about records for ProjectItem and SolutionFolder items. See related parent item.

Examples:

ProjectItem prj1 = ...
SolutionFolder folder1 = ...

prj1.parent.Value = folder1;  // folder1 now contains project `prj1`
folder2.header.parent.Value = folder1;  // folder1 now contains folder2

Cc: @SirPolly

Anybody, you can test it via CI-build-35

However! I've plan to review interface of adding new items for more simplified use before final release. Today or tomorrow. See #8