By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,474 Members | 1,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,474 IT Pros & Developers. It's quick & easy.

EnvDTE.DTEClass.LaunchWizard Method

P: n/a
I have a Wizard project I'm working on to create a solution, add projects to the
solution, yadda yadda. Now I'm trying to add classes/modules using the .vsz
wizard file. I tried using the AddFromTemplate method of the ProjectItems
collection, but that only accepts .vb or .vbproj files (so far). It does not
accept the vbproj. Not only that, when I use AddFromTemplate, it doesn't change
the template values in the template, just copies the file to the destination
directory and adds it to the project. The [! ...] vals are left intact!

So, I'm left with using the LaunchWizard method. Fine, used it before...but not
for adding items. I am getting a ComException when I execute the following code:

Dim contextParams As Object() = { _
EnvDTE.Constants.vsWizardAddItem, _
Project.Name, _
Project.ProjectItems, _
Me.LocalPath, _
"common.vb", _
"C:\Program Files\Microsoft Visual Studio .Net 2003\Vb7", _
True _
}

Try
.DTE.LaunchWizard(templatePath & "Module.vsz", contextParams)
Catch Ex As Exception
MsgBox(Ex.Message)
End Try

I believe it is because of the third contextParam item. The Project.ProjectItems
collection. In the MSDN documentation, that parameter is supposed to be a
"pointer" to the Project.ProjectItems object. So, how do I go about doing that?

Thanks in advance...

Mythran
Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.