Trouble with updating my application through ClickOnce

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?

Upvotes: 1

Views: 291

Answers (1)

Marc
Marc

Reputation: 3959

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.

Upvotes: 1

Related Questions