Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. Visual Studio build macro

Visual Studio build macro

Scheduled Pinned Locked Moved Visual Studio
helpcsharpvisual-studiocomdebugging
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lukeer
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups