How to hide Framework dropdown in the wizard window in vsix extension

135 views Asked by At

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>
1

There are 1 answers

1
Ed Dore On

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.