Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / February 2006

Tip: Looking for answers? Try searching our database.

vs.net 2005 add in problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dave - 16 Feb 2006 15:21 GMT
I have taken a macro that i use and created a vs.net add in.  I am having a
problem adding new files or items to the project.  It worked fine in the
macro but i am not sure how to do this in the vs.net add-in.

In the macro i was able to do the following
DTE.ItemOperations.AddNewItem("Web Developer Project Files\Visual Basic\Text
File", "sp" & tname & ".txt")

My addin seems to error out on this line.  I have tried a number of
variations but still without success.

Help please.  thanks
dave
Carlos J. Quintero [VB MVP] - 16 Feb 2006 15:45 GMT
Hi Dave,

Which is the exact error that you are getting? Seeing your code, the only
thing that I see is the DTE root variable, which exists in macros but not in
add-ins. The OnConnection method receives an Application As Object parameter
that you must cast to a variable of the EnvDTE.DTE type and use it instead
of "DTE".
Signature


Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

>I have taken a macro that i use and created a vs.net add in.  I am having a
> problem adding new files or items to the project.  It worked fine in the
[quoted text clipped - 10 lines]
> Help please.  thanks
> dave

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.