Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

BUG In EnvDTE.ProjectItems.AddFromTemplate Method
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





Report this thread to moderator Post Follow-up to this message
Old Post
Mythran
09-18-04 02:00 AM


RE: BUG In EnvDTE.ProjectItems.AddFromTemplate Method
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 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
>
>
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Steve Baker
09-28-04 02:02 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Studio archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:10 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.