Closed TanayParikh closed 2 years ago
@phenning I'm not seeing where the file path is actually specified (I'm assuming the description isn't parsed for the path, is it?):
@phenning I'm not seeing where the file path is actually specified (I'm assuming the description isn't parsed for the path, is it?):
args.files is the zero based index into the primaryOutputs object array
"files": "1" or "files": "1;2" if you wanted to open multiple files.
Is Index.razor what we want to open vs other things like Program.cs? Could we open both?
Is Index.razor what we want to open vs other things like Program.cs? Could we open both?
Index.razor was just the first one to come to mind. Yeah we can definitely do program as well.
Now that I looked at the other web templates, I noticed none of the others are opening any files. Maybe we should do the same here. I just asked the question in case the team wanted to consider for this template. We might want to err on the side of consistency though
Razor class library does this.
Basically you want to have the file you want to open as a conditional secondary primaryOutput for non-CLI hosts, then add a post action.
https://github.com/dotnet/aspnetcore/blob/5026aefddd69322da633d4b29a3d24c4df0b51b9/src/ProjectTemplates/Web.ProjectTemplates/content/RazorClassLibrary-CSharp/.template.config/template.json#L99
_Originally posted by @phenning in https://github.com/dotnet/aspnetcore/pull/42215#discussion_r903146520_