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 / February 2006

Tip: Looking for answers? Try searching our database.

SolutionEvents.Opened but no active projects:(

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boni - 05 Feb 2006 12:32 GMT
Dear all,

When a any c++ project is opened in VS2005 I get a following sequence of
events.

event: BeforeClosing

event: BeforeClosing

event: ItemAdded,item name:Project9 kind:VCProject

event: ItemAdded,item name:Project9 kind:VCProject

event: ItemAdded,item name:Source Files kind:VCFilter

event: ItemAdded,item name:Source Files kind:VCFilter

event: ItemAdded,item name:main.cpp kind:VCFile

event: ItemAdded,item name:main.cpp kind:VCFile

event: ItemAdded,item name:Header Files kind:VCFilter

event: ItemAdded,item name:Header Files kind:VCFilter

event: ItemAdded,item name:test.h kind:VCFile

event: ItemAdded,item name:test.h kind:VCFile

event: ItemAdded,item name:Resource Files kind:VCFilter

event: ItemAdded,item name:Resource Files kind:VCFilter

m_SolutionEvents.Opened

m_SolutionEvents.Opened

Now withing solution events handler I have

Public Sub Open() Handles m_SolutionEvents.Opened

Console.writeline(" m_SolutionEvents.Opened")

console.writeline( _DTE2.ActiveSolutionProjects.Count.ToString);

If _DTE2.ActiveSolutionProjects.Count = 0 Then Return

...

Unfortunately _DTE2.ActiveSolutionProjects.Count is alwas 0. Strange, since
the project sgould be already active.

I also tried ParseStatus but it returns OK and has no influence on this
problem.

Any ideas how I can be notified when the project is active and ready to use?

Thanks a lot,

Boni
Boni - 05 Feb 2006 13:23 GMT
I found following at:
http://72.14.207.104/search?q=cache:Rz6uCJ-Z-74J:msdn.microsoft.com/chats/transc
ripts/vstudio/vside_jan_19_05.aspx+SolutionLoaded&hl=de&gl=de&ct=clnk&cd=3&clien
t=firefox-a

Has somebody already found a workaround?

Craig Skibo [MSFT] (Expert):
Q: SolutionEvents.SolutionOpened event is fired before solution is loaded in
VS2005. in VS2003, 2002, was fired after load. is this by design? is there a
way to catch an event that fires when the solution is completely loaded?
A: There were some changes necessary because of some changes to how
solutions are loaded in VS2005. VS 2005 loads projects async now for
performance reasons. When loading a solution with many projects, especially
if those projects are checked into a source code control system, VS could
become unresponsive. So the loading mechanism was changed to load the
solution file, then in the background load all the projects. We are still
firing the event at the same place (when the solution has finished opening),
the difference now is that the projects are not loaded until after the event
fires.
I can look into trying to either make the event fire the same way it did in
previous versions (preferred), or add a new event (not as ideal)

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.