How can I disable build before publishing?


  • Hello!

    I want to publish my project as ClickOnce. But I have an edited version of exe file. So I want to replace exe in Release folder with my exe.

    But before publishing is going build, which replaced my "new exe" file with builded.

    Can I disable auto build before publishing somehow? 

    • Moved by Helen Zhou Thursday, March 01, 2012 1:12 AM (From:.NET Framework Setup)
    Wednesday, February 29, 2012 2:01 PM


  • I'm afraid that you cannot do that under Visual Studio:


    The /target:publish command tells MSBuild to invoke the publish target. The publish target depends on the build target. This means that the publish operation is a superset of the build operation. For example, if you made a change to one of your Visual Basic or C# source files, the corresponding assembly would automatically be rebuilt by the publish operation.

    For information on generating a full ClickOnce deployment using the Mage.exe command-line tool to create your ClickOnce manifest, see Walkthrough: Manually Deploying a ClickOnce Application.


    And if you do not want the msbuild to be involved into the publish proceed, then you can consider to use the mage.exe/mageUI.exe tool to publish the application manually.

    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    Thursday, March 01, 2012 2:57 AM

All replies