ARTICLE AD BOX
I am maintaining the project template for our company and got the task of migrating from the old .SLN format to the new .SLNX format. To structure our code, we have a two solution directories: source and tests.
Everything works without an issue, except that the solution folders are not added to the new solution.
This is how my base solution file looks like in the template:
<Solution> <Folder Name="source"> <Project Path="source/SomeSourceProject.csproj"/> <!--#if (someTemplateToggle)--> <Project Path="source/SomeOptionalSourceProject.csproj"/> <!--#endif--> </Folder> <Folder Name="tests"> <Project Path="tests/SomeSourceProjectTests.csproj"/> <!--#if (someTemplateToggle)--> <Project Path="tests/SomeOptionalSourceProjectTests.csproj"/> <!--#endif--> </Folder> </Solution>And this is how it looks like after I create a new project. It doesn't matter if I create it with CLI, Rider or VS. The outcome is always identical.
<Solution> <Project Path="source/SomeSourceProject.csproj"/> <Project Path="source/SomeOptionalSourceProject.csproj"/> <Project Path="tests/SomeSourceProjectTests.csproj"/> <Project Path="tests/SomeOptionalSourceProjectTests.csproj"/> </Solution>I already tried to play around with post-action scripts and everything and tried to manually build my solution, but I keep breaking more and more (projects missing, solution not generated in general, ...).
