Sub ProjectExample()
' This function creates a solution and adds a Visual Basic Console
' project to it.
Dim soln As Solution2
Dim proj As Project
Dim msg As String
' Create a reference to the solution.
soln = DTE.Solution
' Create a new solution.
soln.Create("c:\temp2", "MyNewSolution")
' Create a new Visual Basic Console application project.
' Adjust the save path as needed.
Dim fileN As String
fileN = soln.GetProjectTemplate("ConsoleApplication.zip", "VisualBasic")
proj = soln.AddFromTemplate(fileN, "c:\temp2", "My New Project", True)
' Save the new solution
soln.SaveAs("c:\temp2\newsolution.sln")
msg = "Created new solution: " & soln.FullName
MsgBox(msg)
End Sub