Skip to content

CLI Solution Sync Command #28781

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

Closed
cpendery opened this issue Oct 26, 2022 · 2 comments
Closed

CLI Solution Sync Command #28781

cpendery opened this issue Oct 26, 2022 · 2 comments
Labels
Area-CLI untriaged Request triage from a team member
Milestone

Comments

@cpendery
Copy link

Is your feature request related to a problem? Please describe.

We are trying to update a solution file for a given path such that every ProjectReference inside the .csproj file in that folder is recursively iterated and added to the solution.

Describe the solution you'd like

We'd like to run a dotnet cli command that will perform this action.

Description:
  .NET modify solution file command that recursively traverses the C# project dependency tree in the directory
  where the solution file is located to update the solution file to contain all projects in the dependency tree

Usage:
  dotnet sln sync <SLN_FILE> <CSPROJ_FILE> [options]

Arguments:
  <SLN_FILE>  The solution file to operate on. If not specified, the command will search the current directory for one.
  <CSPROJ_FILE>  The csproj file to start operating on. If not specified, the command will search the directory of the SLN_FILE for one.

Options:
  -?, -h, --help  Show command line help.

Additional context

Happy to contribute support for this

@ghost ghost added Area-CLI untriaged Request triage from a team member labels Oct 26, 2022
@KalleOlaviNiemitalo
Copy link
Contributor

slngen is somewhat similar but AFAIK it cannot add to an existing solution file.

@marcpopMSFT marcpopMSFT added this to the Backlog milestone Dec 15, 2022
@cpendery
Copy link
Author

slngen is somewhat similar but AFAIK it cannot add to an existing solution file.

We ended up using this solution. It is able to append entries into an existing solution file, but we just dropped solution files entirely and now build them on the fly with slngen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CLI untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants