Hi,
I followed the article in msdn Programatically create project for creating the new project.
But when i run this project it does not generate any add-in manager and also does not return any error.
It just opens a new VS window.
Can anybody tell me whats wrong with the code below?
public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
_applicationObject = (DTE2)application;
_addInInstance = (AddIn)addInInst;
createProject(_applicationObject);
}
public void createProject(DTE2 dte)
{
Solution2 soln = (Solution2)dte.Solution;
string csTemplatePath;
string csPrjPath = @"C:\Prajakta Work\praj";
// Get the project template path for a C# console project.
// Console Application is the template name that appears in
// the right pane. "CSharp" is the Language(vstemplate) as seen
// in the registry.
csTemplatePath = soln.GetProjectTemplate("ConsoleApplication.zip", "CSharp");
System.Windows.Forms.MessageBox.Show("C# template path: " +
csTemplatePath);
// Create a new C# console project using the template obtained
// above.
soln.AddFromTemplate(csTemplatePath, csPrjPath, "New CSharp Console Project", false);
}Regards,
Prajakta