Open TheRSP opened 6 years ago
We had a comment on Twitter on this https://twitter.com/peval27/status/1404920313289269248?s=20
Anyone know why we do not already do this?
is this issue been considered at all?
@KathleenDollard
Can this be considered for an upcoming release? The ability to script adding non-project solution files to the solution would be ideal.
Just throwing my hat in the ring as 😱 that this is still not possible in 2022
and 5 years later, still is not implemented 👎
Hey folks - this one got lost in the tagging/labeling shuffle. I'd love to see this implemented - I've marked it up for grabs in case anyone has the desire to contribute. The spec that @TheRSP laid out is a good guideline to follow here. Some additional behavior clarifications:
Edit: I just realized that the issue is only related to the dotnet CLI. and which is still not possible.
In Case, anyone trying to do this in VS Code using the NEW C# Dev Kit Extension.
Here are the Steps to add files at the solution level.
At the moment, we don't have a dedicated Add File option at the Solution Level.
Also, I doubt, whether it is possible without Solution Explorer as Solution Items is a Solution folder and Solution folders are not a physical folder on the disk.
Users can already add a project directly to a solution folder with the CLI with the "--solution-folder" option, which even creates the intermediary folders if they don't already exist. Is there a particular reason why a project and a single file are completely different?
I hope slnx (https://github.com/dotnet/sdk/issues/40913) will have this up front
In my company we often have a small number of files at the solution level for each solution. These include, for example:
I can't find anyway to add to these to a solution. The following image shows the result I would like in visual studio.![image](https://user-images.githubusercontent.com/4334224/42926850-7f53f9a2-8b2a-11e8-9b4f-419f523fd97c.png)
I would propose a command format such as
dotnet sln <SLN_FILE> add file [file1 [file2 [...]]]
for adding items to a 'Solution Items' folder (as above) anddotnet sln <SLN_FILE> add --directory=MyFolderName file [file1 [file2 [...]]]
for adding items to a custom named folder