Skip to content

[Breaking change]: dotnet sln addΒ #43882

Closed
@edvilme

Description

Description

dotnet/sdk#44570
Starting in 9.0.2xx, the cli command dotnet sln add will add support for .slnx solution files using the new vs-solutionpersistence serializer.
As a result, slight changes in behavior are expected.

Version

Other (please put exact version in description textbox)

Previous behavior

  • Projects and Solution Folders could have invalid Windows filenames, or invalid characters in their names
  • Command would fail when attempting to add a nested project with the same name as an existing project

New behavior

  • Projects and Solution Folders names cannot be a DOS word: NUL, CON, AUX, PRN, COM?, LPT?. CLOCK$ (where ? is any number of digits)
  • Projects and Solution Folder names cannot be more than 260 characters
  • Projects and Solution Folder names cannot contain invalid characters such as control characters or ? : \ / * " " < > |
  • Command will no longer fail when attempting to add a nested project with the same name as an existing project, mimicking behavior for non-nested projects.
    Example, adding foo/bar.csproj and parent/child/bar.csproj will not result in an error
  • Exceptions will contain the current strings, but will wrap vs-solutionpersistence's error messages

Type of breaking change

  • Binary incompatible: Existing binaries might encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code might require source changes to compile successfully.
  • Behavioral change: Existing binaries might behave differently at run time.

Reason for change

This changes are introduced for transitioning to the new vs-solutionpersistence serializer

Recommended action

Review project and solution folders names

Feature area

SDK

Affected APIs

AddProjectToSolutionCommand.Execute


Associated WorkItem - 351645

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

πŸ“Œ seQUESTeredIdentifies that an issue has been imported into Quest.Pri1High priority, do before Pri2 and Pri3breaking-changeIndicates a .NET Core breaking changedoc-ideaIndicates issues that are suggestions for new topics [org][type][category]in-prThis issue will be closed (fixed) by an active pull request.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions