Published Application in ClickOnce does not show updates - c#

I am creating a WPF application and publishes it on the IIS. However when I am re-publishing the application since I do have code and UI changes, it doesn't show the changes on the application when I run it.
Anyone encountered this before?

These may be some of those obvious checks you have already done:
Have you checked that the version number is higher and the application did in fact update?
Has the application been set to automatically update?
Is this a online-only or offline mode application?

I found it out! It has something to do with the publish version. I am not incrementing the publish version since I am just publishing minor changes but the consequence is that ClickOnce will not let the application to download the updates from the server since the last version on the client is same as the publish version on the server and ClickOnce assumes the client is already updated.

Related

Windows Application is installing seperate instance as opposed to updating previous version after publish

I'm currently working on a .Net framework 4 Windows application that I've inherited from another developer(that's left my place) that updates from a UNC location.
Whenever I take the old version of the app and publish the new version on top of it and run the setup it installs a separate instance of the application on the machine as opposed to updating the previous version, my suspicion is that this is due to the ClickOnce manifests being signed with a . PFX key that we have lost the password to, but I can't be sure that this is definitely the reason why.
does anyone know how I'd be able to publish the app up to update the previous version without the user having to uninstall/reinstall the app?

App is not starting after being published

Here is my problem:
I've created a little app to communicate with a server, nothing much particular. I'd like to publish it so I can give the app to my friends but after being published, I click the setup, it asks me to install, and after a few seconds, closes and nothing happens.
I've tried to "publish" the app with a Setup project, it installs and when I try to open the app, nothing happens.
I looked for solutions but nothing worked for me. Do you have any ideas?
The programm is under Visual Studio 2019, .NET 4.7.2
This could be related to different reasons, like lack of runtime ( .NET framework runtime ) on target machines or application behavior as well ( you did not tell much about it).
You could use some logging framework like NLogger or Log4Net to save in a log file at least critical errors and warnings so that you could see on target machine directly what the issues are.
in general if you properly used a setup project that should make sure your installer checks for dependencies like .NET runtime and also creates a desktop shortcut,
if you are publishing via ClickOnce you can easily specify in there to create a desktop icon and to include or download pre-requisites during installation phase.
Are you sure the issue is not related to exception handling and some failure happens when application started and tried to communicate with your server and for whatever network setting or reason fails to do so and then silently crashes?
If you try to connect to the server at the initialization of your program (form_load, etc.), it can happen when the connecting to the server fails. The whole application waits to reach a timeout, which may be 30 seconds long. Please check this scenario. See if the server is available and connectable.

Automatic update from clickonce application

I want an C# application which can be installed on someones computer and updates it self if a newer version is available. (The conection is only for this application is within one company)
If I install the application, change something in the code, publish it again it won't check if there is an new application available.
This are my settings: Assembly Information | Publish | Publish - Update
The easiest way is to publish to an intranet website within the company. If they have multiple servers (e.g. load-balanced or standby), publish to one IIS site and copy/paste to the other servers - don't publish to each server individually as the application versions won't match. By default, IIS will stop the install setup EXE running so remove the EXE handler from the site's handlers - simply delete it.
Using this scenario, when a user runs the application it will check the website for a newer version (if they have access) and run with the old version if not, or install your newer version, if available.
You'll also find the published folders contain all previous versions - you might want to remove all previous versions before copying around the IIS sites
Are you looking for updating clickOnce automatically when any new version is available in server? If yes, setting Minmum required Version to your latest version might help. Below link may help you
Making ClickOnce Updates Mandatory?

WPF application doesn't run on another computer

I created a new WPF project. I copied the built .exe file onto another computer and tried to run the application. But nothing happened. It was just loading. Nothing more.
All my WPF projects do this thing.
What am I doing wrong? Has anyone any idea?
Edit: For somebody in the future: the question might not be clear. What I meant was that I created a simple WPF application with nothing in it and tried to run the application on another computer. I wasn't able to make it run. Just nothing appeared. I figured out that the Avast Free Antivirus was causing this problem. When the antivirus is turned off, it runs as expected. Even though it is no solution, at least we know, what was causing the problem.
You are probably missing the dot net libraries on the target machine.
For quick fix, download the dot net framework distributable for the .net version you compiled against and install it on the target machine. Here is 4.5.1 for example.
For actual distribution, look at creating an installer that will ensure all dependencies are installed with the application. InstallShield has a limited edition which may be included with your edition of visual studio
Try publishing your application using click once. You can do this by right clicking on your project > Publish > Specify the location to publish your application > Finish. Copy the files inside the Published folder to another computer and try installing by click the setup.
Note: The instructions I said above only works if you only have basic functions on your app. If your application uses SQL Server, you need to install it first on the computer that you will be installing your application in.
For your reference. How to: Publish a ClickOnce Application using the Publish Wizard

ClickOnce update with Apache server

I have been working on a C# application which needs bug fixes and updates once i deliver it to clients. I am currently trying clickOnce method of microsoft to provide updates.
For that i need to publish my application to server with frontpage server extension (If i am not wrong!). We are using windows server 2008 enabled machine, with Apache running, i googled regarding "Publish c sharp application on Apache server" and i found this workaround.
It edits .htaccess file to allow access to VS to publish application. But it doesn't seem working. I guess the page is out dated, written in 2006.
So my questions are:
How do i publish c sharp app on apache box?
How do we publish app? Using VS or any other method?
The manifest and payload (files) just need to be generated and then copied en masse to your server, it doesn't have to be a Windows machine.
Publish to a local folder/share and then replace the entire ClickOnce folder so that the code security values remain intact. I'd suggest you always rename your current folder and then copy your latest bits into a "new" folder that is your install location.
i managed to give updates with this workaround (i dont know how feasible is this! Need inputs!)
I used database to track version numbers and (link for) latest copy of software. Then i check for updates on startup. If new update is available it downloads exe (in app itself), closes app and run the setup.
I am using install-shield to generate setup. But when i run setup in machine which is already having older version of software, it doesn't update it, even though it displays its updating.
I know visual studio also provides option to create installation, but it isn't working either!

Categories