1

I am currently developing an app for my work which will simplify the workflow in our daily tasks and it will be used from all of my colleagues and this is why I want it to be able to update quite often and I figured that the ClickOnce approach will be perfect for me.

I've managed to get it to work. I've put as a publishing folder "D:\Brandlist Exporting Assistant\" and "http://localhost:8080/" (for the sake of testing). The Application Files are getting updated I can get the latest version of the app through the manifest and I get a desktop shortcut as well. However, the "updating" part is not working. When I make a change to the app and publish the changes when I use the desktop shortcut it is still the previous version. I can still use the manifest and it gets updated but I want to be able to use the shortcut. My question is: Is that possible? Or I'll be able to use only the manifest? My guess is that it doesn't work because of the installation folder URL but I am not sure what I have to put in there.

My question is: What should I put in the installation folder when it is the same as the publishing one?

7
  • Did you check the The application should check for updates checkbox and set it to Before the application starts ? Refer to learn.microsoft.com/en-us/visualstudio/deployment/… Commented May 1, 2019 at 21:04
  • Yes, I already did that. I forgot to mention it. Commented May 1, 2019 at 23:10
  • Can you share the contents of your manifest (*.application) file? Commented May 2, 2019 at 10:59
  • Here you go: pastebin.com/m2Vk5tcd Commented May 2, 2019 at 16:32
  • Is D:\ only accessible from your computer, or is it a network share? Or is this the wwwroot of your webserver (which is also localhost:8080)? Commented May 3, 2019 at 6:45

1 Answer 1

1

My question is: Is that possible? Or I'll be able to use only the manifest?

Yes, it is possible to update the application through the desktop shortcut (this is the preferred way). Starting the app through the manifest file on the network share or url is only needed for the first time.

My question is: What should I put in the installation folder when it is the same as the publishing one?

Testing:

For testing purposes, you can leave the installation folder empty and everything should work on your computer. There is no need for something like http://localhost...:

enter image description here

Production:

In a prod environment you might have different publish and installation folders. The installation folder must be accessible by your clients and the publishing folder is only needed for the publish process. The publishing folder must be accessible by your development computer only.

enter image description here

Side Note:

Make sure that Use .deploy file extension is checked in your publish options:

enter image description here

VS will append a ".deploy" file extension on your assemblies, both .exe and .dll. Unless you are deploying in a controlled environment where you know security policies and firewalls won't interfere with downloading .exe and .dll files it is better to leave this option checked. This will allow the web server administrators to continue blocking .exe and .dll mime types and still let ClickOnce installation succeed.

UPDATE

If you want to use the update mechanism, then you have to specify an 'update location' or 'installation folder URL'. You can use \\localhost\D$\Brandlist Exporting Assistant\ for testing.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi. Thank you for your comment. When I try to leave the Installation URL blank this is what I get: prntscr.com/njubg6 The ".deploy" option is checked by default.
Ok, I haven't checked 'The application should check for updates' and it was possible without installation folder url. In your case you have to specify something. See my updated answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.