Code Comments
Programming Forum and web based access to our favorite programming groups.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 s ubmit it. I created a wizard (the vsz file for it along with a vsdir). I wrote a wiza rd 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 norm al 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 tr y to add any .vsz wizard file using AddFromTemplate, it fails..it only fails if t he .vsz wizard file points to a file (IE: Class.vsz points to Class.vb) contai ns wizard directives (IE: contains [!output..]). It works if I try to add a .v sz 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 a nd wish that someone would help verify this for me. The error message I kept getting is "Unspecified Error". THanks in advance, Mythran
Post Follow-up to this messageYou 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 ProjectIte ms > 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 wi zard > object that implements EnvDTE.IDTWizard. In the Implemented Execute Metho d, 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 no rmal > 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) cont ains > 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 NO T 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 > > > > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.