-1

I am generating the .net core as output project but in the vsix wizard it shows the .net framework drop down which is misleading the user.How to hide this drodown? Do we need to add any property/setting in the below vsTemplate? My VsTemplate looks like below.

enter image description here

VS template => Template Data code looks as below,

 <?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010">
  <TemplateData>
    <Name>Project Toolkit</Name>
    <ProjectType>CSharp</ProjectType>
    <LanguageTag>csharp</LanguageTag>
    <SortOrder>1000</SortOrder>
    <TemplateID>ddfd85f1-6ec9-4703-8b0c-19262fe6420c</TemplateID>
    <CreateNewFolder>true</CreateNewFolder>
    <DefaultName>MyTemplate</DefaultName>
    <ProvideDefaultName>true</ProvideDefaultName>
  </TemplateData>
  <TemplateContent>
    <Project TargetFileName="MyEmpty.csproj" File="MyEmpty.csproj" ReplaceParameters="true">
      <Folder Name=".publish" TargetFolderName=".publish">
        <ProjectItem ReplaceParameters="false" TargetFileName="color.png">color.png</ProjectItem>
        <ProjectItem ReplaceParameters="false" TargetFileName="outline.png">outline.png</ProjectItem>
        <ProjectItem ReplaceParameters="false" TargetFileName="development.json">development.json</ProjectItem>
        <ProjectItem ReplaceParameters="false" TargetFileName="production.json">production.json</ProjectItem>
        <ProjectItem ReplaceParameters="false" TargetFileName="README.md">README.md</ProjectItem>
        <ProjectItem ReplaceParameters="false" TargetFileName="manifestFormat.json">manifestFormat.json</ProjectItem>
      </Folder>
    </Project>
  </TemplateContent>
  <WizardExtension>
    <Assembly>MyWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=f494b956b37a2c3b</Assembly>
    <FullClassName>Me.WizardImplementation</FullClassName>
  </WizardExtension>
</VSTemplate>
Diksha Mundhra
  • 121
  • 2
  • 12

1 Answers1

0

If you remove the RequiredFrameworkVersion element from your vstemplate that should remove the dropdown.

Given your example doesn't have these, I suspect the template you're referencing above, is not the template your testing. Be aware the VS caches project templates, so you may have to clean things up by ensuring your previous template(s) have been uninstalled, and the project and item template cache rebuilt by running devenv.exe from an elevated command prompt with the /InstallVSTemplates switch.

Ed Dore
  • 2,013
  • 1
  • 10
  • 8
  • So, I tried deleting the project templates from cache(C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\16.0_32b3ce76Exp) deleted this folder, and after removing element, it still shows up the dropdown and the strange I noticed is the Wizard doesn't shows up despite having WizardExtension element. My updated vstemplate looks as above(Edited in above question), after removing RequiredFrameworkVersion. – Diksha Mundhra Jun 09 '20 at 23:35