Pablo Galiano : How do I know if the solution is still building

Subscriptions

<July 2010>
SuMoTuWeThFrSa
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567

News

Subscribe to Pablo Galiano by Email

Post Categories

How do I know if the solution is still building

My tenth How do I is up.

Scenario

The scenario is really simple, we want to know if the solution is still building. The focus of this How do I shows how to do it.

 

Interfaces and classes needed

 

Code snippet

    public static bool IsSolutionBuilding(IServiceProvider serviceProvider)

    {

        IVsSolutionBuildManager buildManagerService =

            serviceProvider.GetService(typeof(SVsSolutionBuildManager)) as IVsSolutionBuildManager;

 

        int isBuildManagerBusy = 0;

        ErrorHandler.ThrowOnFailure(buildManagerService.QueryBuildManagerBusy(out isBuildManagerBusy));

 

        return (isBuildManagerBusy == 1);

    } 

 

Assemblies needed

  • Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

 

Stay tuned,

Pablo

posted on Monday, August 25, 2008 6:40 AM by pga

# re: How do I know if the solution is still building @ Monday, August 25, 2008 12:40 PM

I just have to thank you for your great serie of "how do i". I'm very interrested in this.

Of topic - but how do i validate a COM object? That is's still "alive" and not GC:d ?

Johan

# Blog Carnival #1 @ Friday, August 29, 2008 1:12 AM

I&amp;#39;ve decided to collect interesting posts on various topics and when reach critical mass publish

Anonymous