Home > Archive > Visual Studio > September 2004 > BUG In EnvDTE.ProjectItems.AddFromTemplate Method
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
BUG In EnvDTE.ProjectItems.AddFromTemplate Method
|
|
| Mythran 2004-09-17, 9:00 pm |
| 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
| |
| Steve Baker 2004-09-27, 9:02 pm |
| You scratch my back, I scratch yours...
I could seriously use the code described in your post, send it my way, we
can converse about bugs all you want :)
"Mythran" wrote:
> 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
>
>
>
>
>
|
|
|
|
|