microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
228 stars 12 forks source link

[Missing] "Add New file" option on the main Solution #547

Open dileep-hegde opened 1 year ago

dileep-hegde commented 1 year ago

There is no option to add new file on the main Solution where sln file exists.

Note: Even if we create the file manually it doesn't show on the solution explorer.

Missing: Add New File.. option on the main Solution.

Michael-Eng commented 1 year ago

Thanks for the feedback. This is outside of the scope of the initial C# Dev Kit but we will consider

Michael-Eng commented 1 year ago

Dup of #544

dileep-hegde commented 1 year ago

Thanks.

But @Michael-Eng

I doubt, this is not duplicate of #544, here we are able to create a file in Solution folders but not as expected.

But this issue is about not having options to create a file in the main Solution folder where sln file exists as well as Solution explorer not recognizing the file if manually created.

Also, dotnet/sdk#9611, shows It is not even possible through dotnet CLI.

But we have this in Visual Studio. Could you please check this again.

Michael-Eng commented 1 year ago

I will leave this opened, but the ability to create files at the solutoin level (while possible in VS) is outside the scope of the initial C# Dev Kit. We can consider it in the future.

dileep-hegde commented 1 year ago

Thank you for keeping this open. As this is required and useful feature if not "The Most" and is available in Visual Studio.

Moreover, outside of visual studio there is no way this is possible, even with dotnet CLI as mentioned earlier.

So, Kindly, requesting to consider this.

And I think it is safe to remove duplicate tag as I clearly mentioned the difference.

Thanks @Michael-Eng

timheuer commented 1 year ago

@dileep-hegde -- In VS this creates files in either existing, or will create one, solution folders. I think that's what you are saying, just want to confirm. In VS when you create a file at the solution level it will also create a solution folder if one was not specified...that's the behavior you are looking for right? image

dileep-hegde commented 1 year ago

Hi @timheuer,

Yes. In Visual Studio, when we create a new file at the solution level. It creates a solution folder named "Solution Items" if not specified. Also, we can manually create a solution folder, let's say "Resources". and then add a new/existing file to that solution folder.

Currently in VS Code, Solution Explorer doesn't have a dedicated "Add New File" option at the Solution level. We can only create solution folders manually for the files at the solution level.

So, this issue is raised for missing dedicated "Add New File" option at the Solution level.

  1. It should allow to add a new/existing file at the solution level. Automatically, create a solution folder named "Solution Items" if not specified.
  2. Also, it should hint developer to provide a name for the new solution folder.

Thanks.