You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Hi! My template is a single C# project, but I also want to create an .editorconfig and LICENSE file for new solutions. I've avoided making my template a solution template because I want users to be able to create a new project in an existing solution, which from my understanding isn't possible with solution templates (correct me if I'm wrong).
Right now, I'm solving this by using .. with rename:
I'm doing this so that my template can be instantly ready to be committed to a Git repository, while also still being available to add to an existing solution. This has a few problems, though:
This overwrites existing files when creating a new project in an existing solution (create a solution + project, add a .gitignore, create the template project in that solution).
Even if those files don't already exist, it's not a great experience to add a project to an existing solution and have it create solution-wide files. I'd ideally have it only try and copy the files when creating a new solution+project in one go.
When the project and solution are both in the same root folder (checking "Place solution and project in the same directory"), the files get created outside of the project folder! This also occurs when using the dotnet CLI.
Right now, I just have a symbol that the user can toggle off when creating a new project, but ideally I'd automatically detect the right conditions to create these files (creating a new solution+project and project is in a subdirectory). So far, I've tried:
Using context:createsolutiondirectory and context:isexclusive as seen in the wiki (doesn't work on the dotnet CLI or JetBrains Rider)
Setting preferNameDirectory to true (doesn't seem to do anything?)
Setting editorTreatAs to solution (also doesn't seem to do anything?)
Describe the solution you'd like.
Either being able to detect when a new solution is being made (or a project is being made without a solution) in a condition, or being able to rename files into a solution directory (if it exists).
Additional context
I've looked and there seems to be a lot of vaguely related issues, but none that specifically meet what I'm trying to do:
Is your feature request related to a problem? Please describe.
Hi! My template is a single C# project, but I also want to create an .editorconfig and LICENSE file for new solutions. I've avoided making my template a solution template because I want users to be able to create a new project in an existing solution, which from my understanding isn't possible with solution templates (correct me if I'm wrong).
Right now, I'm solving this by using
..
withrename
:I'm doing this so that my template can be instantly ready to be committed to a Git repository, while also still being available to add to an existing solution. This has a few problems, though:
Right now, I just have a symbol that the user can toggle off when creating a new project, but ideally I'd automatically detect the right conditions to create these files (creating a new solution+project and project is in a subdirectory). So far, I've tried:
context:createsolutiondirectory
andcontext:isexclusive
as seen in the wiki (doesn't work on the dotnet CLI or JetBrains Rider)preferNameDirectory
totrue
(doesn't seem to do anything?)editorTreatAs
tosolution
(also doesn't seem to do anything?)Describe the solution you'd like.
Either being able to detect when a new solution is being made (or a project is being made without a solution) in a condition, or being able to rename files into a solution directory (if it exists).
Additional context
I've looked and there seems to be a lot of vaguely related issues, but none that specifically meet what I'm trying to do:
The text was updated successfully, but these errors were encountered: