I seem to have found a bug in the AddFromTemplate method of the ProjectItems
object. I'm asking that someone can double-check/verify this bug before I submit
it.
I created a wizard (the vsz file for it along with a vsdir). I wrote a wizard
object that implements EnvDTE.IDTWizard. In the Implemented Execute Method, I
have the code to show a form then execute a method I named CreateSolution. All
is well, I can successfully create a solution and add 5 projects (4 are normal
class projects from EmptyProject.vbproj) using IO.File.Copy and then
DTE.Solution.AddFromFile. (the 5th uses EmptyWebProject.vbproj).
Now, in the web project, I try to add a file using AddFromTemplate. If I try to
add any .vsz wizard file using AddFromTemplate, it fails..it only fails if the
..vsz wizard file points to a file (IE: Class.vsz points to Class.vb) contains
wizard directives (IE: contains [!output..]). It works if I try to add a .vsz
wizard file that does not contain a directive (IE: vbscript.vsz), it works. So,
through debugging, I found that if I try to add a .vsz wizard that does NOT point
to a file that contains a directive, then I can successfully add any other .vsz
wizard files after that without any errors. I can then delete the blank
vbscript.vbs file I added first and the project is set up correctly.
Maybe a little bit of work to try and test this, but it is a bug I am sure and
wish that someone would help verify this for me. The error message I kept
getting is "Unspecified Error".
THanks in advance,
Mythran