-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create Solution Folder #6
Comments
Solution Folders(items) are possible through:
IEnumerable<SolutionFolder> SolutionFolders So you can try to create new folder and/or its items in the same manner like from my example here.
Let me know if you can't something, I'll prepare some example later. |
Any clue on how to get the NestedProjects section populated?
SolutionFolder takes a list of RawTexts for single files, but no projects? Quick hint please :D Also, seems I'm not properly writing the sln. The writer duplicates all project decls.
|
Today's way for creating solution folder looks like: var folders = new List<SolutionFolder>(sln.Result.SolutionFolders)
{
new SolutionFolder
(
new ProjectItem()
{
pType = Guids.SLN_FOLDER,
name = "MyFolder1",
path = "MyFolder1", // recommended to be same
pGuid = Guid.NewGuid().ToString()
},
new List<RawText>()
{
".gnt\\gnt.core",
".gnt\\packages.config",
// ...
}
),
//...
}; handlers for this case as I said: var whandlers = new Dictionary<Type, HandlerValue>() {
[typeof(LProjectSolutionItems)] = new HandlerValue(new WProjectSolutionItems(folders)),
}; But seems we have no handlers for I've plan to implement this, follow the news. |
ah yes, forgot to say about map. I don't recommend this, but anyway, just for clarify before support. In any case, you can easily get access to any lines of loaded .sln. As it was illustrated: The So we can get anything to manual processing. However, this is not recommended way. Because I specially prepared flexible architecture to add any custom handlers (including user space) for any lines which are still not processed (or for multiple processing). Thus, temporarily you can try to add your custom handler, then just register it in listeners for common use. I think we need also add some documentation for this <_< But of course, MvsSln should support this by default. Ticket above. |
Thank you for your quick answer :) I decided to implement this with a rather long python script. It's crude but it does the job. A list of things to consider when implementing this might help you:
|
It will be implemented later anyway. At least by me. In fact, the main features was extracted from vsSolutionBuildEvent project. Mainly for DllExport, but I also had plans in past for just splitting something like this including its script engine etc. That is, this feature was simply not required to someone(including me) for all that period :) But MvsSln should really cover it. Basically, we just need to implement ISlnHandler and IObjHandler with related logic for new handlers. It shouldn't be hard. I will look into later. More probably this March, well, as possible for my time. Also follow the new issue. |
You can test new features starting from CI-build-37 https://github.com/3F/MvsSln/releases new SolutionFolder("dir1",
new SolutionFolder("dir2",
new SolutionFolder("dir3", "hMSBuild.bat", "DllExport.bat")
)
);
...
new ProjectItem("Project1", ProjectType.Cs, new SolutionFolder("dir1"));
More probably it's beyond of this project. You can easily use it manually from your app. However, you also can create new issue for suggest this feature. It will be considered later. |
Hello,
as far as I can see, I can't create new project folders or assign projects to folder. Our build system generates a flat list of 400 C++ projects and I want to categorize them.
The text was updated successfully, but these errors were encountered: