locked
Publish A Single File RRS feed

  • Question

  • Hi,

    I have the following scenario. I publish a C# Windows assembly to a file share using ClickOnce and make it available offline. 30  minutes later after some people have run and downloaded the application  I realise I need to make a change to one of the files.

    Is there a way I can publish the one new file to the same folder on the server and the people that have already run the application pcik it up ? Or do I need to publich a new version and use the "Specify A Minimum Version" to get the one file updated on the client

    Thanks John

    Monday, March 18, 2013 3:59 PM

Answers

  • Hi John,

    Thanks for the detailed information.

    I think there should be a new version for users to update the file, but you can try to use mageUI to update the file as I metioned before, adding one additional step to increase the current version. You don't need to publish the whole package to the server, and the location is not changed.

    In fact, if there is an update on client machine, all files which are already cached in the current version will be directly copied to the new version's cache folder. It will not take much time since only one file is downloaded from the server.

    Here are some steps to use mageUI.exe:

    1. Use mageUI to open application manifest (.exe.manifest).
    2. Change the version number.
    3. Populate the files in "Files" tab if there are any updates of the files.
    4. Sign and save the manifest.
    5. User mageUI to open deployment manifest (.application).
    6. Change the version number and minimum required version number.
    7. Select application manifest in "Application Reference" tab.
    8. Sign and save the manifest.

    You can then copy the .application file to the versioned application folder if needed.

    Best regards,


    Chester Hong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Chester Hong Wednesday, April 3, 2013 8:54 PM
    Friday, March 22, 2013 2:25 AM
  • You have to publish a new version in some way in order for ClickOnce to recognize it as an update. You can update the current deployment as noted by Chester, but it's still going to install on the user's machine as a new version.

    I didn't understand when you said you were installing an assembly using ClickOnce. Is it a smart client application like WPF/Winforms?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

    • Marked as answer by Chester Hong Wednesday, April 3, 2013 8:54 PM
    Saturday, March 23, 2013 5:38 PM

All replies

  • Hi John,

    I think publishing a new version is an easier way. The file will be updated in the next version.

    Although we can update a new file in the current application on the server, the file hash has also been changed. We need to update and resign the application manifest and deployment manifest.

    http://msdn.microsoft.com/en-us/library/dd465299.aspx

    The people who have not installed / updated the latest version will get the updated file. However, base on my understading, the people who have already updated the latest version may not update the file, since the versions in manifest are the same and no updates are execuated.

    Best regards,


    Chester Hong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 20, 2013 3:11 AM
  • Hi Chester,

    Thank you for the reply. Yes I would have preferred to publish as new version however if I give a bit more detal of the exact situation, perhaps you could help suggest a solution.

    I have an exitsing c# app with several hundred Users, the .exe and dlls live on a server to which the User have a shortcut. The app is now being rolled out to more Users at remote sites whose connection to the server is not fast which is why I am looking to Use the ClickOnce deployment as it greatly improves the speed (I have tested this). I would like to be able to acheive the following:

    1. I don't want to change the Users' shortcut everytime I publish a new version so need to be able to publish a new version back to the same folder but have the clients pick up the updates from that folder
    2. I have scheduled tasks on the server calling the code so again don't want to have to change these for every new version
    3. After a production move occasionaly I need to update one file (my original question)

    Apologies for not explaining the full situation in my original post but I was trying not to complicate the question.

    Thanks you in advance for any ideas with this

    John

    Thursday, March 21, 2013 8:18 AM
  • Hi John,

    Thanks for the detailed information.

    I think there should be a new version for users to update the file, but you can try to use mageUI to update the file as I metioned before, adding one additional step to increase the current version. You don't need to publish the whole package to the server, and the location is not changed.

    In fact, if there is an update on client machine, all files which are already cached in the current version will be directly copied to the new version's cache folder. It will not take much time since only one file is downloaded from the server.

    Here are some steps to use mageUI.exe:

    1. Use mageUI to open application manifest (.exe.manifest).
    2. Change the version number.
    3. Populate the files in "Files" tab if there are any updates of the files.
    4. Sign and save the manifest.
    5. User mageUI to open deployment manifest (.application).
    6. Change the version number and minimum required version number.
    7. Select application manifest in "Application Reference" tab.
    8. Sign and save the manifest.

    You can then copy the .application file to the versioned application folder if needed.

    Best regards,


    Chester Hong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Chester Hong Wednesday, April 3, 2013 8:54 PM
    Friday, March 22, 2013 2:25 AM
  • You have to publish a new version in some way in order for ClickOnce to recognize it as an update. You can update the current deployment as noted by Chester, but it's still going to install on the user's machine as a new version.

    I didn't understand when you said you were installing an assembly using ClickOnce. Is it a smart client application like WPF/Winforms?

    RobinDotNet


    Click here to visit my ClickOnce blog!
    Microsoft MVP, Client App Dev

    • Marked as answer by Chester Hong Wednesday, April 3, 2013 8:54 PM
    Saturday, March 23, 2013 5:38 PM