I have a solution with several projects. One of them is a setup project. If you expand the setup project in the Solution Explorer, you see a Detected Dependencies node. If you right click on it, you get a menu item called Refresh Dependencies. This refreshes any dependencies based on the files included in the setup.
I am asking if I can execute this action outside Visual Studio, using either devenv.com or MSBuild.
I want this because I am using CruiseControl.NET for continuous integration and in some solutions I found that the setup output is missing some dependencies because of the way I automatically build the projects.
Update:
It turned out that my setup is not very friendly to how Setup projects work in Visual Studio. I ended up using Post Build Events in order to create the whole application structure ready to just be copied to a computer and work out of the box. I am not using setup projects in Visual Studio anymore, unless I really have to.
In Solution Explorer, select the projects you want to load (press Ctrl while clicking to select more than one project), and then right-click on the project and choose Reload Project. Visual Studio will remember which projects are loaded the next time you open the solution locally.
They are basically no different, they are used to store and manage references. Just as Lex said, the Dependencies is a better way to represent different types of references, we can clearly know where the reference comes from, SDK, nuget, etc. so that we can manage our references more efficiently.
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 in the command line:
devenv /command "Macros.MyMacros.RefreshDependencies C:\MyProjects\MyApp\"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With