Is there a way to run "Refresh Dependencies" in a configuration project outside of VS2008?

I have a solution with several projects. One of them is the installation project. If you deploy the installation project in Solution Explorer, you will see node dependencies detected. If you right-click on it, you will get the Refresh Dependencies menu item. This updates any dependencies based on the files included in the configuration.

I ask if I can perform this action outside of Visual Studio using either devenv.com or MSBuild.

I want this because I use CruiseControl.NET for continuous integration, and in some solutions I found that some dependencies are missing from the installation output due to the way I automatically create projects.

Update:

It turned out that my setup is not very friendly with how installation projects work in Visual Studio. I ended up using Post Build events to create an entire application structure, ready to just copy to a computer and work out of the box. I no longer use installation projects in Visual Studio, unless I need it.

+5
source share
1 answer

Record or create a macro:

Option Strict Off
Option Explicit Off
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics

Public Module RefreshDependencies
    Sub TemporaryMacro()
        DTE.ActiveWindow.Object.GetItem("Project\Setup1\Setup1").Select(vsUISelectionType.vsUISelectionTypeSelect)
        DTE.ExecuteCommand("Build.RefreshDependencies")
    End Sub
End Module

Then just call the macro at the command prompt:

devenv / command "Macros .MyMacros.RefreshDependencies C: \ MyProjects \ MyApp \"

+2
source

All Articles