How does the VS wizard work?
See original GitHub issueI’ve been trying to use the TemplateEngine Wizard to embed a dotnet templating template in a VSIX package. I know SideWaffle v2 does exactly that, but I want to understand how the wizard works instead of relying on a third-party tool. So far I have failed to get a template working without SideWaffle in VS2019. Here’s what I got from @sayedihashimi’s explanations:
- The nupkg that contains the template needs to be in the vsix.
- a pkgdef needs to be included with the following content to make the template discoverable for the wizard:
[$RootKey$\TemplateEngine\Templates\<something-unique>]
"InstalledPath"="$PackageFolder$" // Path to the folder with the nupkg
- A .zip file with the template.json and .vstemplate needs to be in the vsix
- Set the following CustomParameters in the vstemplate file
- $groupid$ to the group id specified in the template.json file
- $language$ to the language as specified in the template.json under tags.language (or is this appended to groupid to get the identity?)
- $uistyle$ to ‘none’
- Reference the wizard in the vstemplate file:
<WizardExtension>
<Assembly>Microsoft.VisualStudio.TemplateEngine.Wizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</Assembly>
<FullClassName>Microsoft.VisualStudio.TemplateEngine.Wizard.TemplateEngineWizard</FullClassName>
</WizardExtension>
- In the vsix manifest, include the template folder as a ProjectTemplate asset and the pkgdef as a vspackage asset:
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
<Asset Type="Microsoft.VisualStudio.ProjectTemplate" Path="<path to folder that contains zip file (zip file can be in subfolder of this for VS nodes)>" />
</Assets>
Having taken all these steps, VS fails to create a project from the template when testing the VSIX. I shows an error dialog with the following message:
To create this project type, go to Tools | Options | Projects and
Solutions | .NET Core and check "Use preview versions of the
.NET Core SDK"
Which seems to indicate that maybe it can’t find the dotnet executable (even thought it’s in my PATH). I’m wondering if I’m missing anything or if anyone has a clue what’s wrong. VSIX built with SideWaffle v2 work just fine.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Sorcerers or Wizards - Baldur's Gate 3 - GameFAQs
Depends on what you want to achieve: Sorcerers have access to less arcane spells overall, but in return they gain Metamagic, allowing them...
Read more >dnd 5e - What is the broad overview of the differences ...
Wizards use Intelligence as a spellcasting modifier, while sorcerers use Charisma. These abilities are associated with different skills, so that ...
Read more >wizard and sorcerer, whats the difference : r/BaldursGate3
Lore wise, a Wizard gets their power from learning and study which causes their magic to be based on the intelligence stat.
Read more >Sorcerer vs Wizard? Whats the key differences?
They learn two free spells of any level they can cast at each level, and they can learn more by copying them into...
Read more >Wizard (card game)
The objective of the game is to bid correctly on the number of tricks that a player will take in the subsequent round...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@phenning Sorry for the bump. How should the templating engine find and copy over the nupkg? It’s not getting copied over to the .templateengine folder.
@donJoseLuis Well I looked into this again to upload the project and gave it another go from scratch in the process and… It works! I don’t have a clue what I did wrong before or what I did differently this time, but I have it working right now 😃 I’ll reopen or open a new issue if I figure out what happened and it turns out to be a bug, but for now I’ll assume I did something wrong.