-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
I very often use the add-command to add newly created projects to my solution. Now it just simply fails without any sense or reason. It would seem that it tries to take my path to a project as the name of the item-to-be-added? Crazy. Because in the past versions (I have to downgrade to .NET 8 for now), it of course reads the referenced project file and just works.
To Reproduce
c:\Code\some>dotnet sln add ..\common\Data.Forms
Names cannot:
- contain any of the following characters: / ? : \ * " < > |
- contain control characters
- be system reserved names, including 'CON', 'AUX', 'PRN', 'COM1' or 'LPT2'
- be '.' or '..' (Parameter 'name')
c:\Code\some>dotnet --list-sdks
1.1.0 [C:\Program Files\dotnet\sdk]
3.1.426 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.136 [C:\Program Files\dotnet\sdk]
6.0.321 [C:\Program Files\dotnet\sdk]
9.0.200 [C:\Program Files\dotnet\sdk]
Until .NET 8.0.406 at least, the same command actually works and adds my project to the solution.
Why, on Earth, did this awful change happen? Please fix this. I'm mostly working in command-line.