Share via

Visual Studio 2022/.NET template engine (template.json): Can I add custom UI inputs and multi-page wizard steps?

Ajay Gera 50 Reputation points
2026-03-30T18:13:26.5666667+00:00

Hi All,

I’m creating an MCP Server project template using the .NET template engine (template.json) and want a richer project creation experience in Visual Studio 2022 (File → New → Project).

Is it possible to define additional user inputs beyond the standard parameters (e.g., custom UI controls like dropdowns/checkboxes, conditional fields, or dynamically populated values)?

Can the template drive a multi-step / multi-page wizard flow (i.e., more than the default “Additional information” page), so users can click Next/Back through additional pages before the project is created?

Developer technologies | Visual Studio | Extensions
0 comments No comments

3 answers

Sort by: Most helpful
  1. Surya Amrutha Vaishnavi Lanka (INFOSYS LIMITED) 1,960 Reputation points Microsoft External Staff
    2026-03-31T10:21:13.94+00:00

    Thanks for reaching out!

    Yes you can add richer inputs to a .NET template shown in Visual Studio 2022, but only within the constraints of the .NET Template Engine UI. And no templates cannot drive a true multi-step flow inside the built‑in New Project experience. Below is the clear breakdown and the supported options.

    1. Additional user inputs in the “Additional information” page

    Using the .NET template engine (template.json), you can define extra parameters that Visual Studio automatically renders on the single “Additional information” page. Supported inputs include

    1. Dropdowns using "datatype": "choice"
    2. Checkboxes using "datatype": "bool"
    3. Text fields using "datatype": "text"
    4. custom wizards

    You can create a VSIX extension and implement IWizard to show custom UI and collect additional input.

    However:

    • The wizard UI appears as separate modal dialogs
    • It is not integrated into the built‑in New Project wizard pages
    • It cannot replace or extend the standard wizard flow

  2. Ajay Gera 50 Reputation points
    2026-03-31T05:47:37.6266667+00:00

    I tried using .vstemplate + IWizard, but that launches wizard pages as modal dialogs on top of the existing “Configure your project” page. Instead, I want each step to be a separate page within the same wizard flow, not stacked dialogs.

    Also I need to change caption of Create button to Next on "Configure your project” page.

    How we can acheive this?

    0 comments No comments

  3. Q&A Assist
    2026-03-30T18:13:43.28+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The .NET template engine (template.json) itself does not support adding custom Visual Studio UI controls, dynamic multi-page wizards, or arbitrary extra dialogs. It is limited to the standard parameter collection experience that Visual Studio provides (the built-in “Configure your new project” / “Additional information” page).

    To get a richer, multi-step wizard experience with custom UI and logic when creating a project in Visual Studio, a custom wizard must be implemented using the Visual Studio extensibility model, not just template.json.

    Visual Studio supports this via the IWizard interface and project templates packaged in a VSIX:

    • Implement Microsoft.VisualStudio.TemplateWizard.IWizard in an assembly.
    • Package that assembly in a VSIX.
    • Connect the wizard to a project template by adding a <WizardExtension> section to the .vstemplate file of the project template:
    <WizardExtension>
        <Assembly>MyProjectWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=token</Assembly>
        <FullClassName>MyProjectWizard.WizardImplementation</FullClassName>
    </WizardExtension>
    
    • In the WizardImplementation class, use RunStarted (and other IWizard methods if needed) to:
      • Display custom UI (for example, Windows Forms) to collect user input.
      • Add custom parameter values into the Dictionary<string, string> of template parameters.
      • Use those parameters in the template source via $parameterName$ substitutions.

    The IWizard approach allows:

    • Custom UI: any Windows Forms or WPF dialog(s) can be shown, with arbitrary controls (dropdowns, checkboxes, conditional fields, etc.).
    • Multi-step / multi-page flows: multiple forms can be shown in sequence, implementing Next/Back logic as desired before the project is created.
    • Dynamic behavior: values can be computed at runtime, additional files can be added, and the project can be customized programmatically.

    In summary:

    • template.json alone cannot define extra Visual Studio UI pages or multi-step wizards.
    • For rich, multi-page project creation in Visual Studio 2022, a VSIX-based project template with an IWizard implementation and a .vstemplate file must be used.

    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.