none
Custom step during click-once publishing

    Question

  • I would like to find a way to configure VS to run come code just after pulishing a click once application. Is there a way to do this automaticaly or do I need to write a seporate app?

     

    Jacob

    Wednesday, July 02, 2008 9:28 PM

Answers

  • VS won't do any extra steps as part of the publish process.

     

    Depending on what you're trying to do, you may be able to use post-build commands. Does it really have to be after publish, or would post-build work? What are you trying to do?

     

    RobinS.

    GoldMail.com

     

    Thursday, July 03, 2008 6:21 AM

All replies

  • VS won't do any extra steps as part of the publish process.

     

    Depending on what you're trying to do, you may be able to use post-build commands. Does it really have to be after publish, or would post-build work? What are you trying to do?

     

    RobinS.

    GoldMail.com

     

    Thursday, July 03, 2008 6:21 AM
  •  

    I rearange the files a bit to simplify the file tree for the app (basicaly reducing it to only the current version) and then I slightly modify the deployment manifest so that it correctly points to the application manifest under the new arangement.

     

    I have code written that takes the published files and does these things. it might be able to be modified to work on build. I will look into it.

     

    Thanks

    Jacob

    Thursday, July 03, 2008 1:55 PM
  • You are rearranging the files in the publish folder? What do you mean "reducing it to only the current version" ? Why would it have more than one version?

     

    Unless you have a bunch of stuff in folders in your project, the files should be included pretty much all in the same folder.

     

    RobinS.

    GoldMail.com

    Thursday, July 03, 2008 9:54 PM
  • I don't put in more than one version, Visual Studio keeps the old versions in place.

     

    The built in publish feature in VS makes a file structure looking something like this:

     

    Publush Folder (specified by developer)

    -deployment manifest

    -setup.exe file

    -Application Files folder

    --App_1_0_0_0 folder

    ---(files, see below)

    --App_1_0_0_1 folder

    ---(files, see below)

    --App_1_0_0_2 folder---copy of deployment manifest

    ---application manifest

    ---(project output files)

     

    as you can see, it leaves the prior versions in place

     

    What I do is change that to:

     

    Publush Folder

    -deployment manifest

    -Application folder

    --application manifest

    --(project output files)

     

    This way, all the files (except the deployment manifest) are in the same folder.

    Tuesday, July 08, 2008 3:38 PM
  • Why?

     

    The setup.exe, publish.htm, and deployment manifest (yourapp.Application) in the top level point to the appropriate version under ApplicationFiles. Why would you change the directory structure; what's the point?

     

    This creates a lot of maintenance in the long run, plus you are setting yourself up for problems. Note that MSFT does not guarantee that the structure of those folders will be the same in subsequent versions of Visual Studio (or even SP's). They did change it between VS2005 and VS2008. They don't account for people wanting to change it, because the point of ClickOnce is that it is supposed to be simple and not allow customization.

     

    RobinS.

    GoldMail.com

     

    Tuesday, July 08, 2008 3:56 PM
  • Hi Jacob,

    You could always try using a third party tool to build the ClickOnceDeployment as part of a post build step... something like ClickOnceMore (www.clickoncemore.net) might be of use.
    Friday, July 11, 2008 1:03 PM