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

Add support for dotnet sln add file and dotnet sln add folder #45072

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Bartleby2718
Copy link

@Bartleby2718 Bartleby2718 commented Nov 23, 2024

This PR closes #9611.

@baronfel, can you

  • assign the issue to me;
  • assign this PR to me; and
  • review this PR?

Thanks in advance!

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Nov 23, 2024
string args;
if (_inRoot)
{
args = $"--{SlnAddParser.InRootOption.Name} ";
Copy link
Author

Choose a reason for hiding this comment

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

There was a bug where there were 4 dashes.
image

]);
}

public static bool IsValidSolutionFolderName(string folderName)
Copy link
Author

Choose a reason for hiding this comment

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

image


private static string TrimProject(string path)
Copy link
Author

Choose a reason for hiding this comment

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

Inlined

fullFilePath);
}).ToList();

// Perform the same validations as Visual Studio:
Copy link
Author

Choose a reason for hiding this comment

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

image
Didn't check for user options files; should I? If so, what files should I be looking for?

Copy link
Author

Choose a reason for hiding this comment

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

Moved inside the add directory

@Bartleby2718 Bartleby2718 marked this pull request as ready for review November 23, 2024 20:37
@kasperk81
Copy link
Contributor

in case you weren't aware of slnx work, the timing is critical here. #44570 needs to go in for next release: 9.0.200 (by feb) and having this pr up means one of you is going to have massive merge conflicts to address. probably best to hold off this one. let #44570 go forward in peace, let slnx support light up in dotet-sln-remove command, clean up the entire SlnFile project src/Cli/Microsoft.DotNet.Cli.Sln.Internal (reading/writing logic is offloaded to visual studio library https://github.com/microsoft/vs-solutionpersistence) and THEN start adding new feature on that baseline.

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

Successfully merging this pull request may close these issues.

dotnet sln add should allow non-project files to be added to the solution
2 participants