Yesterday I did a Web Cast on the new ClickOnce deployment features of VS.NET 2005. I had a few outstanding questions from the web cast and promised to ping some internal resources and post the answers on my blog. Answers were provided by Ken LeFebvre - DCC. Thanks Ken!
(PS. Also, please note the new list of links I added on the right side of my blog for upcoming MSDN Events events this quarter in the Gulf States. Click here for all locations throughout the US.)
So, here are the questions and answers:
1) Using no-touch deployment in vs 2003, it was required to have Internet Explorer 6.0 or higher on the client machine to make sure all the hand shakes were done correctly. Is this still a requirement or is the only requirement now the 2.0 framework? You do not need IE 6.0 on your client machine. You only need a web browser that supports the standard Windows URL handlers. The .NET Framework knows to use ClickOnce simply by handling a MIME type (which is associated with the .application extension). (http://www.windowsforms.net/FAQs/default.aspx?PageID=2&ItemID=8&CategoryID=24&tabindex=2). The key fact is that there’s nothing special in Internet Explorer to support ClickOnce, it’s all handled by the MIME support in Windows itself. As opposed to No-Touch Deployment where there are special bits in IE that recognize a NTD application. At least, that’s how we understand it…
2) When rolling back a version, how do you roll back a schema in a db that the app might be needing as well as any other earlier versions of external data files?
3) How has the default set of permissions changed from 1.1 to 2.0 in partially trusted apps? I’m not sure what the specific differences are in permission sets between 1.1 and 2.0… I have noticed a bigger difference in behavior between Windows XP and Windows 2003 Server, than between the versions of the Framework. The only thing ClickOnce really changes is the automatic check for CAS permissions and debugger emulation of the targeted deployment zone, which should result in more permission issues being raised at development time rather than production runtime.
4) How do you include other files to be added to your app on deployment? I see the application button in the publish designer has the list of these but no add button. Is it as simple as just adding the files to the project in solution explorer? You are correct, the way to add new files would be to include them in the project. Alternatively, you could just manually type them into the application manifest (which is what that button is giving you access to).
5) How do you invoke scripts or other executables upon install? You need to incorporate the Bootstrapper, if you want to execute custom logic during the initial deployment. As I understand it, thought, that the bootstrapper does not run upon subsequent updates, only the initial deployment, so if you need custom logic for each update, that may need to be included in the application itself. (http://www.windowsforms.net/FAQs/default.aspx?PageID=3&CategoryID=24&SubcategoryID=29&tabindex=2)
6) Where can I download the Task Vision app from? You can get TaskVision from http://www.windowsforms.net/Applications/application.aspx?PageID=20&tabindex=8 , but we have made several changes from that baseline for our demonstration, not the least of which was the upgrade from .NET 1.1 to 2.0. The full source will be distributed at our MSDN events from April Thru June on the content DVD. See http://www.msdnevents.com/russ to find a location near you and register for this free event.
7) How many revs can I go back to? We demo just one, but can you go back further? ClickOnce will only ever allow a single level of rollback. By default, previous versions are maintained on the server, so you could build a custom way to roll back further, but out-of-the-box, you can only rollback one version. (http://www.windowsforms.net/FAQs/default.aspx?PageID=2&ItemID=36&CategoryID=24&tabindex=2)
8) How does this work for a Windows service application? (Ie… how about things like stopping and restarting it after the update, unassisted by a user?) I haven’t thought about using ClickOnce to deploy a service, but off the top of my head, I don’t think ClickOnce would easily deploy a service application, because its built-in behavior incorporates several dialog boxes to interact with the user.
That FAQ page that I referred to above is an excellent resource for common questions. Any other suggestions on these questions are welcome! Thanks.