none
How to include folder when one go for clickonce deployment RRS feed

  • Question

  • for our windows project we use click once deployment. so when user run their application then project download in his pc if any update is there. suppose i have created a folder in my project where i have store some images. now i want to publish that folder with images click once deployment as a result when user will run his application then those publish folder will download with all images in his pc. so tell me how could i publish my folder during click once deployment. please guide me with screen shot & full step by step direction.
    • Moved by KareninstructorMVP Thursday, September 12, 2019 7:51 PM Moved from Windows forms forum
    Thursday, September 12, 2019 6:40 PM

Answers

  • Hi Sudip_inn,

    To publish a ClickOnce include folder, you can refer to the following steps.

    First, create a new folder "img" in project and add the image file into the folder.

    Then, choose Project ->Properties... -> Publish -> Application Files... -> set the image's "Publish Status" to "Data File".

    Use the following code to access the image.

        pictureBox1.Image = Image.FromFile(ApplicationDeployment.CurrentDeployment.DataDirectory + @"\img\a.jpg");

    The last step, rebuild and publish the project.

    Regards,

    Kyle


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, September 13, 2019 1:52 AM
    Moderator

All replies

  • Hi Sudip_inn,

    To publish a ClickOnce include folder, you can refer to the following steps.

    First, create a new folder "img" in project and add the image file into the folder.

    Then, choose Project ->Properties... -> Publish -> Application Files... -> set the image's "Publish Status" to "Data File".

    Use the following code to access the image.

        pictureBox1.Image = Image.FromFile(ApplicationDeployment.CurrentDeployment.DataDirectory + @"\img\a.jpg");

    The last step, rebuild and publish the project.

    Regards,

    Kyle


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, September 13, 2019 1:52 AM
    Moderator
  • Sir thanks a lot for such good help. have nice day :)
    Friday, September 13, 2019 7:24 AM