Public "Click Once" application
As the title suggests, I would like to create - and public - my application through Visual Studio's Publish Wizard. I am running 开发者_开发技巧into an issue, however. It seems as though by publishing my application VS is forcing me to create an installer. The problem is that I do not want my application to have to install! I would like for my application to be a "normal" click-once executable that is usually produced when I choose not to publish my project. I want to be able to copy and run this application from any directory and not have to install it (at all).
I hope this is even possible. Thank you very much for any help.
Well, the definition of a ClickOnce application is to allow you to install it with a single click (hence the name). It is then installed into the Application Cache, and either run only from online activation, or offline via a Start Menu shortcut. You don't have to include the installer when publishing the ClickOnce application if it will be activated from online only.
If all you want is an executable that can be run with no installation what-so-ever, I'd suggest just zipping it up as part of your build and publishing that.
I think what you think you want is the "online-only" option. If you select that option in the Project properties, it will still install on the user's machine (it always does), but it won't show up in add/remove programs, and the user has to run it from a link on a website -- there won't be any shortcut on the desktop.
Note that the setup.exe is not an installer per se. It is the bootstrapper. It checks to see if the prerequisites are installed, and if they are, it fires off the ClickOnce application. If they aren't, it installs them, and THEN fires off the ClickOnce application.
If you know the prerequisites are installed, you can give your users a link to the .application file itself -- this is what is called just to do the ClickOnce installation itself.
精彩评论