Logo
BUG: SolutionBuild.Build method builds only one project in Visual Studio add-ins or macros

Author: Carlos J. Quintero (Microsoft MVP) Applies to: Microsoft Visual Studio 2005
Date: January 2008   Microsoft Visual Studio 2008
       
Introduction

This article explains a bug in the EnvDTE.SolutionBuild.Build method of the automation model when trying to build a solution programatically.

More Information

The EnvDTE.SolutionBuild.Build method only builds the startup project of the solution, not all the projects. 

Steps to reproduce the problem:

  • Create a macro with the following code:
    Sub BuildSolution()
       DTE.Solution.SolutionBuild.Build(True)
    End Sub
  • Create a solution with two projects and run the macro. The Output window shows that only one project was build. This problem did not happen in Visual Studio .NET 2003.

As a workaround, you can iterate the projects of the solution can call SolutionBuild.BuildProject.


Go back to the 'Resources for Visual Studio .NET extensibility' section for more articles like this


Top