Visual Studio build macro
-
Hi experts, please pardon me for crossposting[^]. I just didn't find this forum right away without help. My solution contains an actual project, a setup project and a setup customization project. Most of the times I have changed something, I simply hit F6 to compile or F5 to debug. Since the setup project takes a lot longer to compile than the rest, it is left out of this "normal" compilation (Its checkbox in configurations editor is not checked). Whenever I have solved a bunch of problems and want to compile the whole thing, I have to manually open configurations manager, check the "Build" checkbox for setup, close configurations manager, change to release, build, change back to debug, build, open configurations manager again, uncheck "Build" for setup and close configurations manager. I tried to record this as a macro. Here is the record
Sub TemporaryMacro() DTE.ExecuteCommand ("Build.ConfigurationManager") DTE.ExecuteCommand ("Build.SolutionConfigurations", "Release") DTE.ExecuteCommand ("Build.RebuildSolution") DTE.ExecuteCommand ("Build.SolutionConfigurations", "Debug") DTE.ExecuteCommand ("Build.RebuildSolution") DTE.ExecuteCommand ("Build.ConfigurationManager") End Sub
Instead of doing what I described above, it opens the configurations manager, waits for user to close it, builds, changes to release and gives an error message that calling a COM component resulted in HRESULT E_FAIL. Obviously, this approach doesn't work as expected. How would I have to change the macro to fit my needs? (Actually, I don't want to open configurations manager. I just want to in/exclude the setup project in/from the build process. And this is the only way I know to do it.)
Ciao, luker