ligershark / sidewafflev2

Other
30 stars 11 forks source link

Support for Item Templates #4

Open shaggygi opened 6 years ago

shaggygi commented 6 years ago

It would be nice to have the ability to create an extension for a template pack to add a specific item in existing project/folder. This could allow single or multiple files/items added to your project.

Scenario Steps:

  1. Create any new C#-type project (Class Library, Console, WPF, etc.). This shouldn't matter since the extension example will be a C#-type in this case.
  2. Once project is loaded in VS, right-click the project or any project folder in Solution Explorer.
  3. Click Add > New Item...
  4. In the Add New Item Dialog, navigate to your extension node (e.g. Demo.Console) under Visual C# Items.
  5. Select your extension item/file in the middle section. For example, you might have simple single file with default boilerplate code. This would also include your item icon next to item name and the description on right section.
  6. Name the item.
  7. Click Add.
  8. Item with boilerplate code is added to the project/folder that was selected in Solution Explorer (step 2).
sayedihashimi commented 6 years ago

We only have support for Project Templates currently. The wizard built by @mlorbetske and team I believe is limited to projects for now. I will discuss with him when I get back to the office on Wednesday.

sayedihashimi commented 6 years ago

The workaround for now is to add item templates via the normal .vstemplate approach. You may be able to use TemplateBuilder for the item templates but I've never tested that.

sayedihashimi commented 6 years ago

FYI I've updated the title of this issue

attilah commented 6 years ago

@sayedihashimi do you have any update on Item template support?

sayedihashimi commented 6 years ago

Item Templates may actually work, but I haven't had a chance to try it out. My understanding to get it to work needs:

attilah commented 6 years ago

Sounds good, I'll try it and get back to you.

sayedihashimi commented 6 years ago

@attilah did you have a chance to try it?

vtherry commented 6 years ago

Hi @sayedihashimi, I have tried to create Item templates based on the tips you've given without success. Do you have a sample showing this ? Any update on Item template support ? Thank you