I am trying to figure out why some of our clickonce applications (.net winforms) in visual studio 2019 are behaving differently when installing. Some applications always require the publish folder to be accessible on the network. Other applications we have can have the published files zipped up and installed on any pc regardless if its on the network or if it can access the publish folder. Is there a specific setting for the project that allows the published files to be zipped up and deployed anywhere outside of our network ?
I am currently trying to install our application in a virtual desktop and I get the error "clickonce application download did not succeed" before the install attempts to start.
In the clickonce error log it gives the publish folder path as "deployment provider url" (which cant be accessed on the virtual desktop) and says path not found.
Thanks,
I'm new to using click once when publishing my applications, I've managed to get my application published. However, when I launch the application as a user I'm finding that the app settings file has not been pulled from the server to the user's device. This results in the application falling over on startup.
My question is how when publishing via Click once can I ensure that an app settings Json is copied to the user's machine?
I'm using .net core 3.1 for my application with Microsoft Visual Studio Community 2019
Version 16.8.3 for my IDE for complete context.
After adding appsettings.json (or any content file) make sure you set the build action to Content and set Copy to output directory to Copy Always (or copy if newer):
Then it will be automatically included as part of the deployment files. To make sure the file will be included in the deployment files, in the ClickOnce setup, in settings step, click on Application files and make sure the publish status is Include (Auto):
I am trying to change where my ClickOnce application is hosted. I do not care about making this a smooth transition for users who already have the application installed because it is not in production yet. I thought this would be as simple as changing the installation folder url and the update location url in the Project Publish properties. Some context: The application was previously hosted on a Azure Ftp server and I would publish directly from Visual Studio. Now I want to host the application on a Wpengine server that uses SFTP. Visual Studio does not support publishing through SFTP so I have to publish to a local folder and upload through WinSCP/Filezilla. Steps I am taking to publish to the new location:
Change the Publishing Folder Location to a local directory.
Change the Installation Folder to the new wpengine directory.
Change the Update Location to the new wpengine directory.
Publish and manually upload through winscp to the wpengine directory.
When I download the setup.exe file and run it shows me the old Azure url as the "From" source as seen in the image below and it installs the latest version that is hosted in our Azure location. Obviously this is not the desired result. I even double check the manifests with MAGEUI and everything seems correct. I cannot find a single reference in my code to the old azure location either. I am not sure if this is some sort of code signing issue but I cannot for the life of me figure out how this old azure url is getting referenced.
We are developing C# 4.0 windows based application using visual studio 2010. Now we want to make an installable version of the exe using clickonce to deploy our application. I am new to .NET platform. So, please give me a step by step procedure to use clickonce to deploy my application.
While following steps :What should i need to given in Installation Folder URL Box(2 nd text Box):
Here is the break down of the two paths in this wizard
Publish Folder - Where should the Publish process put the ClickOnce deployment package
Installation Folder - Where will users of the application go to install the application from
Often times these are the same location. For example when I deploy ClickOnce applications internally I publish to a network share. This is the same place where users go to install the application.
One scenario where they would be different is when the users install from a web location. In that scenario you'd often have a publish folder which was a network share or path on the local computer while the installation folder was a web site URL
Bit of a strange question, but how do ClickOnce deployments work from a web site? I seem to be having some problems with this. Basically, the setup file will download when you click the "install" button, but then some files are missing.
Do you need to be on a Microsoft server to run ClickOnce deployments? I usually do deployments over a local server with UNC, and as this is the first time I've done one online I'm struggling a bit.
Any newbie tutorials you can point me to would be great, and if I do need a special host for it, could you please recommend some?
Thanks for all the answers everyone :)
Are you going to the setup.exe file or the .application file?
Deployment has to be pointed to the .application file. The ClickOnce file will then be launched directly there, no explicit "Save as" download. Once the manifest is loaded, the application will download what it needs and off it runs.
The first thing you need to do is determine if you want the user installing your app to run locally or launching it from the web only.
Second make sure you are using Internet Explorer to launch your application. The .application is registered in IE, but not other browsers.
I'd recommend server only. (At least to start) You don't have to worry about incremental updates. The user will get the correct version of your program every time.
There is nothing special going on with the server. It's all in the browser/.application.
It works from any file server, for example here is a ClickOnce deployment from an SVN server (i.e. I'm checking in the ClickOnce files after each publish): http://o2platform.googlecode.com/svn/O2_ClickOnce_Installers/O2_XRules_Database
Can you provide more details on what settings you have on the Publish tab of your project?
Regarding missing files, yes it can be a pain since ClickOnce doesn't auto add all dependent files from sub projects (I have found in the past that you need to include the extra (non dlls) files you need in the project you are deploying via ClickOnce)
No special hosting requirements are needed. You just need to make sure all the files required by the published clickonce app are deployed.
Take a look here :
http://msdn.microsoft.com/en-us/library/31kztyey%28VS.80%29.aspx
You can deploy to a webserver using either FTP or HTTP. You need to have the following MIME types set up in order to host the deployment:
.application --> application/x-ms-application
.manifest --> application/x-ms-manifest
.deploy --> application/octet stream
If you are deploying .Net 3.5 as a prerequisite, you need these as well:
.msp --> application/microsoftpatch
.msu --> application/microsoftupdate
If you have vsto apps, you need this one:
.vsto --> application/x-ms-vsto
Check out the Application Files dialog in the Publish tab to see what files are included. You can try running the exe file from your \bin\release folder, but if it's using something in the Global Assembly Cache (GAC), it will work and not tell you you're missing it.
Here are some other helpful links:
ClickOnce Overview
http://msdn2.microsoft.com/en-us/library/142dbbz4(VS.80).aspx
HowTo publish a clickonce app
http://msdn2.microsoft.com/en-us/library/31kztyey(VS.80).aspx
RobinDotNet
Visit my ClickOnce blog!