Skip to content

Conversation

@mruxmohan4
Copy link
Contributor

@mruxmohan4 mruxmohan4 commented Jan 8, 2025

This change performs the following:

  • Replaces custom solution file parsing with the new parser from vs-solutionpersistence library
  • Removes hardcoded headers, in addition to global and project sections
  • Depends on a new solution serializer which saves the solution model to the solution file
  • Adds relevant solution properties to the solution model (to match old behavior)

From initial local testing:

  • No differences in SolutionConfigurationPlatforms global section
  • Only differences in ProjectConfigurationPlatforms global section pertained to project guids (however, order remained the same), which is expected behavior
  • No differences in the SolutionItems project section
  • No differences in SolutionProperties and ExtensibilityGlobals, apart from the solution guid, which is recreated upon each slngen invocation
  • Only differences in the set of initial projects defined in the solution file pertained to project guids (however, order remained the same), which is expected behavior

@mruxmohan4 mruxmohan4 force-pushed the dev/mruxmohan/slnx branch 7 times, most recently from 8f9f182 to d4f1f1b Compare January 9, 2025 10:47
@kasperk81
Copy link

slngen's command line options are

  -d|--solutiondir <path>             An optional path to the directory in which the solution file will be generated. Defaults to the same directory as the project. --solutionfile will take precedence over this switch.
  -o|--solutionfile <path>            An optional path to the solution file to generate. Defaults to the same directory as the project.

consider adding --format <sln|slnx>

upcoming dotnet SDK 9.0.2xx (and v10 from daily builds) has

dotnet new sln --help
...
Template options:
  -f, --format <sln|slnx>  Choose the format for the solution file: sln or slnx.
                           Type: choice
                             sln   Solution file
                             slnx  XML Solution file
                           Default: sln

see the feedback from VS team about naming/terminology dotnet/sdk#44469 (comment)

@mruxmohan4 mruxmohan4 force-pushed the dev/mruxmohan/slnx branch 3 times, most recently from ef42fb3 to 5c5f022 Compare January 23, 2025 17:13
@kasperk81
Copy link

@mruxmohan4 any plans to revive this?

@kasperk81 kasperk81 mentioned this pull request Sep 28, 2025
@mruxmohan4 mruxmohan4 force-pushed the dev/mruxmohan/slnx branch 2 times, most recently from 4d2f111 to 7e2198c Compare October 22, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants