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 / Extensibility / January 2006

Tip: Looking for answers? Try searching our database.

Not all information present when DTE2.Events.SolutionEvents.Opened fires (VS.NET 2005)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles Nicholson - 12 Jan 2006 00:38 GMT
My 2005 plugin's cached reference to the DTE2 object reports the
Solution.FullName property as "" when it fires.  This only seems to
happen on newly-created solutions, not on pre-existing solutions that
were simply opened.

It also seems that not all projects are fully loaded when this event
fires (from empirical evidence as well as the extensibility & VSIP team
chatlog at http://tinyurl.com/8xzk5).

The problems I'm having are all due to the fact that the Opened event no
longer fires when the solution and all contained projects are fully
loaded (as it appears to have in VS.NET 2003), so my question is this:

Does anyone know a good way to determine when a solution (newly-created
or loaded) and all projects have completed loading?

Thanks in advance for any suggestions/advice,
Charles Nicholson
Dmitry Shaporenkov - 12 Jan 2006 08:47 GMT
Hello Charles,

I've never used this event, but I recommend you to take a look at VSIP APIs.
There is
an IVsSolutionEvents.OnAfterOpenSolution callback there that doesn't seem
to have the problem you mentioned.
At least, it works ok for me.

Regards,
Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

> My 2005 plugin's cached reference to the DTE2 object reports the
> Solution.FullName property as "" when it fires.  This only seems to
[quoted text clipped - 14 lines]
> Thanks in advance for any suggestions/advice,
> Charles Nicholson
Carlos J. Quintero [VB MVP] - 12 Jan 2006 10:37 GMT
> My 2005 plugin's cached reference to the DTE2 object reports the
> Solution.FullName property as "" when it fires.  This only seems to happen
> on newly-created solutions, not on pre-existing solutions that were simply
> opened.

About this part, see if this bug report of mine helps:

http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=7d46f
433-51f4-4cce-ac5d-7e5b2efc8e1a


Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio 2005, Visual Studio .NET,
VB6, VB5 and VBA
You can code, design and document much faster in VB.NET, C#, C++ or VJ#
Free resources for add-in developers:
http://www.mztools.com

Anna-Jayne Metcalfe - 14 Jan 2006 14:28 GMT
Hi Charles,

> My 2005 plugin's cached reference to the DTE2 object reports the
> Solution.FullName property as "" when it fires.  This only seems to happen
> on newly-created solutions, not on pre-existing solutions that were simply
> opened.

I can confirm this - we ran headlong into this very issue several months
ago.

Newly created projects receive an "Opened" even with a null solution
pathname, even though it is apparent they have already been saved. To work
around it we set a flag and then check for the pathname when other regularly
occuring events (e.g WindowActivated or "BeforeExecute") are received. The
same behaviour occurs with converted projects, although in that case the
solution is not automatically saved by VS until the user chooses to or a
build starts.

We've seen this in VS2002, VS2003 and VS2005. Be warned however that VS2005
in particular is *very* picky about what add-ins do when it is creating or
converting a project. In particular, reading anything from the Visual C++
automation model during these operations is a sure way to run into hard to
diagnose problems.

It's a real shame the automation interface doesn't provide any obvious way
to tell when a project conversion or wizard is running, or the corresponding
events.

> It also seems that not all projects are fully loaded when this event fires
> (from empirical evidence as well as the extensibility & VSIP team chatlog
> at http://tinyurl.com/8xzk5).

That wouldn't surprise me.

> The problems I'm having are all due to the fact that the Opened event no
> longer fires when the solution and all contained projects are fully loaded
> (as it appears to have in VS.NET 2003), so my question is this:
>
> Does anyone know a good way to determine when a solution (newly-created or
> loaded) and all projects have completed loading?

"Opened" is the only way I know of. Try the techniques above to work around
it.

Kind Regards,

   Anna-Jayne Metcalfe

   Software/Product Development Consultant,
   Riverblade Limited.
   http://www.riverblade.co.uk
Carlos J. Quintero [VB MVP] - 16 Jan 2006 12:05 GMT
> It's a real shame the automation interface doesn't provide any obvious way
> to tell when a project conversion or wizard is running, or the
> corresponding events.

Hi Anna,

Could you log your suggestion on the MSDN Product Feedback Center?:

http://lab.msdn.microsoft.com/ProductFeedback/

MS is working now on Orcas and maybe even with the specs yet. I sent a long
list of mine privately to Craig Skibo (MS extensibility team) some time ago,
so you can send yours to him or do it officially at that web site.

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


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.