c# - How can I create new blank solution in vs 2008 programmatically? -


the design based approach is: new project -> other project type -> visual studio solution -> blank solution

i have create blank solution programmatically in c# , in solution add new empty project , files. found lot of code on web using dte adding empty project in existing solution explorer please give me reference code.

you can create new blank solution using dte this:

string visualstudioprogid = "visualstudio.solution.9.0"; type solutionobjecttype = system.type.gettypefromprogid(visualstudioprogid, true); object obj = system.activator.createinstance(solutionobjecttype, true); solution3 solutionobject = (solution3)obj; solutionobject.create(".", "mysolution"); solutionobject.saveas(@"c:\temp\mysolution.sln"); //or wherever prefer 

you have add references envdte.dll, envdte80.dll, , envdte90.dll. resulting file simple , created in other ways (as plain text file).


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -