ClickOnce not updating
- I'm trying to publish my app using ClickOnce. I publish the files first to the local file system on my dev box with the installation and update folder set to a web address on our server. Then I transfer the files over to the server and this seems to work okay for the first installation. However, it does not seem to be updating when I publish a new version. What's worse is that when I uninstall the application and try and reinstall using the publish.htm from the webserver I get the old version back even though I've removed the old version from the server!
Does anybody have any idea what might be happening here?
Answers
- Actually, I'm admin'ing the server so I think I've fixed it. Unfortunately, I inherited the server and I was having a tough time figuring out how it had been configured. I can't understand why Apache is so popular, configuring it is a total nightmare!
I'd happily share with anybody else who encounters the same problem how I fixed it, but I'm not entirely sure what I did myself. I tried several things, none of which made any difference until the old cache cleared out. Then something worked. I just don't know which one and I'm not inclined to try and break it again just to find out!- Marked As Answer bywjousts Wednesday, November 04, 2009 6:04 PM
All Replies
Hi wjousts,
You want to publish the application to a folder on your dev box and then copy it to the server and have it work, right?
You need to set the publishing folder location to your dev machine, but the Installation Folder URL needs to match the address on the webserver. It should point to the folder with the yourappname.application file and setup.exe.
The easiest way to test that is to have it create the publish.thm file and include it in the deployment. This is under the Options dialog. In VS2008, it is under the Deployment tab, just set the Deployment web page to "publish.htm" and check the box for "automatically generate".
Then copy the files out to the web server and try to bring up the publish.htm file.
Also, you need to look at how you are deploying them on the server. If you are running VS2008, it will have the publish.htm, yourapp.application, and setup.exe in the top level -- these need to be updated every time you deploy a new version. There will also be a folder called Application Files, and under it will be the different versions.
If you are only copying the version over and putting it under Application Files, you also need to copy the setup.exe and yourapp.application (and publish.htm if you're using it) and put them in the top level. When the user runs the application, it looks at the application file (this is the deployment manifest) on the top level to determine the version and files that he should have. If this file is incorrect, he will install the wrong version.
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev- Thanks for your reply. I had pretty much figured out all of that. I believe the problem I was having was that the server was caching the files. This morning it worked correctly, presumably because the cache has expired overnight. I think I've worked out how to stop the server (Apache) from caching my files, but my changes wouldn't take with the old files still in the cache and I couldn't figure out how you're supposed to flush the cache in Apache.
Anyway, it seems to work at the moment.- Edited bywjousts Wednesday, November 04, 2009 6:01 PM
- Aaaaah. I forget about that problem with Apache servers. That comes up once in a while in here. You have to talk to the server admins; there's certainly no way to get it to stop via the ClickOnce publishing action.
RobinDotNet
Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev - Actually, I'm admin'ing the server so I think I've fixed it. Unfortunately, I inherited the server and I was having a tough time figuring out how it had been configured. I can't understand why Apache is so popular, configuring it is a total nightmare!
I'd happily share with anybody else who encounters the same problem how I fixed it, but I'm not entirely sure what I did myself. I tried several things, none of which made any difference until the old cache cleared out. Then something worked. I just don't know which one and I'm not inclined to try and break it again just to find out!- Marked As Answer bywjousts Wednesday, November 04, 2009 6:04 PM


