Solution2.GetProjectTemplate returning the wrong template


  • I have some automation code that worked fine in previous versions of VS.  Now in VS2012, it retrieves the wrong template when Windows Phone tools are installed.  My original code is below.  I have tried several variations based on the MSDN docs and forum posts to no avail.  The templates that it is retrieving are the Windows Phone\Class Library and Windows\

    Dimtemplate AsString= DirectCast(_dte.Solution, EnvDTE80.Solution2).GetProjectTemplate("", "VisualBasic")

            _dte.Solution.AddFromTemplate(template, destpath, name)

    Tuesday, July 02, 2013 8:18 PM


All replies