Skip to content
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

Closed

Conversation

nileshsheth
Copy link
Contributor

@nileshsheth nileshsheth commented Feb 13, 2025

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:

  • Expanded the description to clarify that dotnet sln remove only updates the solution file and does not delete project files.
  • Added expected output for better user experience.
  • Included edge case scenarios in a new "Notes" section.
  • Ensured consistency with the dotnet sln add documentation.

Related Issue:

Fixes #44877

Testing:

  • Verified syntax consistency with other dotnet CLI documentation.
  • Ensured formatting follows .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

📄 File 🔗 Preview link
docs/core/tools/dotnet-sln.md dotnet sln

@nileshsheth nileshsheth requested review from tdykstra and a team as code owners February 13, 2025 14:27
@dotnetrepoman dotnetrepoman bot added this to the February 2025 milestone Feb 13, 2025
@dotnet-policy-service dotnet-policy-service bot added okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. dotnet-fundamentals/svc dotnet-cli/subsvc community-contribution Indicates PR is created by someone from the .NET community. labels Feb 13, 2025

- **`PROJECT_PATH`**
- **`SOLUTION_FILE`**
The solution file to modify. If unspecified, the command searches for a `.sln` file in the current directory.
Copy link
Member

@baronfel baronfel Feb 13, 2025

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.

Suggested change
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.
Copy link
Member

@baronfel baronfel Feb 13, 2025

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.

Suggested change
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.
Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Contributor

@tdykstra tdykstra left a 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Contributor

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.

@Rick-Anderson
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution Indicates PR is created by someone from the .NET community. dotnet-cli/subsvc dotnet-fundamentals/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document dotnet sln remove
4 participants