
AddFromTemplate Method Path Error
Quote:
> Hi All
> I am trying to programically create a new web application. It all seems
> pretty straight forward but I am seemly stuck on the AddFromTemplate
method.
> I created a new web application and named it projBuilderTemplate and
created
> it on "http://localhost/ProjBuilderTemplate/ProjBuilderTemplate.vbproj"
> I have tried buth the UNC and the URl to the project file and it fails
> either way. With the UNC way it says it is a web application and so the
URL
> should be used to the file. When I use the URL (I tried using
http://machine
> name/ as well) it says it can not find the file.
> Enclosed is my code:
> Dim soln As Solution()
> Dim proj As Project
> Dim msg As String
> soln = dte.solution
> soln.Create("c:\temp3", "MyNewSolution")
> Dim template As String
> template =
"http://localhost/ProjBuilderTemplate/ProjBuilderTemplate.vbproj"
Quote:
> proj = soln.AddFromTemplate(template, "c:\temp3", "My New Project", True)
> soln.SaveAs("c:\temp3\newsolution.sln")
> msg = "Created new solution: " & soln.FullName & vbCrLf
> msg = msg & "Created new project: " & proj.Name
> MsgBox(msg)
> Any advice would be greatly appreciated.
> Best Regards,
> Keith