How to Create a Multi Project Solution

How to Create a Multi Project Template

  • Create a new Solution and add all Project Template Projects to this solution.
  • Create a new Solution level item called “solutiontemplate.vstemplate”

  • Zip up all of the project files and the solutiontemplate.vstemplate into a single .zip file, this will be your template.


  • Add a new Class Library Project to the solution. Call it SolutionWizard.

  •  Reference EnvDTE and Microsoft.VisualStudio.TemplateWizardInterface.

  • Add a Wizard.cs file to the project, and implement the IWizard interface.



  • Add a RootWizard.cs file to the project, and implement the IWizard interface.

  • Right click the SolutionWizard Project and click Properties.  Properties -> Signing, check “Sign the assembly”. In the drop down, select New and name it “key”. Uncheck “Protect my key file with a password”. The project is now strongly named.

  • Open a new command Prompt and navigate the directory to: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools (Note: This directory will vary depending on your install)

  • Run the command: sn.exe –T <Wizard Assembly dll>


  •  My Public key token is 1536d802c1e05b55

  • In the solutiontemplate.vstemplate file, right below the templateContent, add

    <WizardExtension>

        <Assembly>SolutionWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1536d802c1e05b55</Assembly>

        <FullClassName>SolutionWizard.RootWizard</FullClassName>

      </WizardExtension>

  • In each project’s vstemplate file, right below the templateContent, add

    <WizardExtension>

        <Assembly>SolutionWizard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1536d802c1e05b55</Assembly>

        <FullClassName>SolutionWizard. Wizard</FullClassName>

      </WizardExtension>


  • In the RootWizard, Put the GUI and any variables you want from the user input.

  • Add a new Project to the solution of type VSIX Project. Name it SolutionVSIX.

  • In the vsixmanifest fill in the Author field.

  • Under Assets
    •  add an assembly reference to the Wizard Project.
    • Add a projectTemplate, point it to the zip file you created earlier (Note you must remove and recreate the zip after each change to the template files)
  • Set SolutionVSIX as the startup project

Adding References

Nuget Packages

  • In the SolutionVSIX project, add a packages folder, and copy all desired .nupkg files into this folder. (You can get these by adding an actual nuget package to the projects and looking in the solution level “packages” folder)

  • Include the .nupkg to the VSIX project and in the properties window, set the Build Action to “Content” and Include in VSIX to “True"


  • In the Project you wish to add the Nuget package to, open that project’s .vstemplate and add

  • The repositoryId is the VSIX manifest’s Product ID.


Project References

  • Add the following in the ItemGroup section of the projects vstemplate file:

    <ProjectReference Include= "..\Domain.Contracts\Domain.Contracts.csproj">

          <Project>{0DD88A2C-46D0-4CC7-BF2C-AB124E443421}</Project>

          <Name>Domain.Contracts</Name>

        </ProjectReference>

  • For the Project Tag, unload the desired project and copy the Project’s ProjectGuid in the PropertyGroup

    <ProjectGuid>{23BC26A4-B9FF-48B7-B2A0-7D3102649616}</ProjectGuid>