Adding a project to Folder in a Visual Studio Template


  • I have created a multi project Visual Studio Template following these instructions:

    This works fine and I can see my two projects in Visual Studio when I select my project template from the File-->New Project option.

    I have followed this link and I am able to add new folders to my solution by doing the following in the CustomWizard.

    public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
         _dte = automationObject as _DTE;
     public void RunFinished()
         _solution = (Solution2)_dte.Solution;

    But I want to add a certain project that is in my template under MyFolder1 and add another project that is in my template under MyFolder2.

    At present with the above code my projects will be loaded from the template AND there will be 2 folders created beside them.  I want the projects under the folders.

    How can I do this??

    Thanks for any help you can give :)

    Thursday, May 1, 2014 8:17 AM