-
Notifications
You must be signed in to change notification settings - Fork 6k
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
dotnet sln remove command (#44877) #44884
Conversation
|
||
- **`PROJECT_PATH`** | ||
- **`SOLUTION_FILE`** | ||
The solution file to modify. If unspecified, the command searches for a `.sln` file in the current directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As of 9.0.200, this isn't strictly true anymore - slnx files will be considered as well if they are present in the current directory.
The solution file to modify. If unspecified, the command searches for a `.sln` file in the current directory. | |
The solution file to modify. If unspecified, the command searches for a `.sln` or `.slnx` file in the current directory. |
|
||
The path to the project or projects to remove from the solution. Unix/Linux shell [globbing pattern](https://en.wikipedia.org/wiki/Glob_(programming)) expansions are processed correctly by the `dotnet sln` command. | ||
- **`PROJECT_PATH`** | ||
One or more paths to the project files (`.csproj` or `.vbproj`) that should be removed from the solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command supports many more types of project files than just csproj or vbproj - I think the clarification here could be removed entirely.
One or more paths to the project files (`.csproj` or `.vbproj`) that should be removed from the solution. | |
One or more paths to the project files to remove from the solution. |
- If the solution file **does not exist**, the command will fail with an error. | ||
- If a specified project is **not part of the solution**, the command will display a message but continue execution. | ||
- **This command does not delete** the project files from disk; it only removes them from the solution file. | ||
- If a solution file is not explicitly provided, `dotnet sln remove` will attempt to find one in the current directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add note here to explain the sln vs slnx probing algorithm that I described in the linked issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency in the CLI documentation, these kinds of notes should go in a Description section near the top of the file, following the synopsis. Changes for formatting consistency are also needed in the examples section. The article also needs to be split into multiple files (one for each subcommand) to be consistent with what was done for dotnet workload
and its subcommands. That requires changes to the other sln subcommands and to the TOC. It would probably be best for you to address only the comments that are easy to do and leave the rest for us.
Did you have an opportunity to read the guidelines for contributions? The article begins with
We appreciate community contributions to documentation
But the first guideline is:
DON'T surprise us with large pull requests. Instead, file an issue and start a discussion so we can agree on a direction before you invest a large amount of time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the comment in the Notes section.
|
||
- **`SOLUTION_FILE`** | ||
#### Description | ||
The `dotnet sln remove` command removes one or more projects from a `.sln` (solution) file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The `dotnet sln remove` command removes one or more projects from a `.sln` (solution) file. | |
The `dotnet sln remove` command removes one or more projects from a solution file (`.sln` or `.slnx`). |
- **`SOLUTION_FILE`** | ||
#### Description | ||
The `dotnet sln remove` command removes one or more projects from a `.sln` (solution) file. | ||
This command updates the solution file but **does not delete** the project files from disk. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command updates the solution file but **does not delete** the project files from disk. | |
The command updates the solution file but doesn't delete the project files. |
- If the solution file **does not exist**, the command will fail with an error. | ||
- If a specified project is **not part of the solution**, the command will display a message but continue execution. | ||
- **This command does not delete** the project files from disk; it only removes them from the solution file. | ||
- If a solution file is not explicitly provided, `dotnet sln remove` will attempt to find one in the current directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency in the CLI documentation, these kinds of notes should go in a Description section near the top of the file, following the synopsis. Changes for formatting consistency are also needed in the examples section. The article also needs to be split into multiple files (one for each subcommand) to be consistent with what was done for dotnet workload
and its subcommands. That requires changes to the other sln subcommands and to the TOC. It would probably be best for you to address only the comments that are easy to do and leave the rest for us.
Did you have an opportunity to read the guidelines for contributions? The article begins with
We appreciate community contributions to documentation
But the first guideline is:
DON'T surprise us with large pull requests. Instead, file an issue and start a discussion so we can agree on a direction before you invest a large amount of time.
@nileshsheth do you mind if we close this case? You can open an issue with your proposed changes. Right now we're heads down with the .NET 10 release, and your proposed changed would required significant time for use to review/make suggests/etc. |
Summary
This PR enhances the documentation for the
dotnet sln remove
command by adding a detailed description, expected output, and additional notes to improve clarity.Changes Made:
dotnet sln remove
only updates the solution file and does not delete project files.dotnet sln add
documentation.Related Issue:
Fixes #44877
Testing:
dotnet
CLI documentation..NET CLI
documentation standards.Additional Notes:
Please review and let me know if any further modifications are needed. Thanks! 😊
@tdykstra, tagging you for review.
Internal previews