I'm having an issue where if I open the .appref-ms file - it will open the ClickOnce dialog box... Then close. The application won't load - just the ClickOnce popup.
However, if I navigate into Local > Apps > 2.0 ... To the actual .exe file - this opens just fine.
Worth also noting that it is only bugging out like this on some devices. I.e. on my machine, opening the .appref-ms file opens the ClickOnce dialog, does the update (if applicable) and then opens the app just fine. Yet one of our customers called to raise the issue.
I've tried to uninstall and reinstall the application.
I've tried clearing out the stuff in Apps > 2.0 ...
Not really sure how else I can debug this?
Thanks.
The problem is the new update to Windows Defender.
I've had to disable Windows Defender for the time being until there's a patch to this problem.
Other people have already figured out the link between the update and ClickOnce apps.
https://social.msdn.microsoft.com/Forums/en-US/954ad3f0-a718-4443-86fd-49877abd130f/after-a-clickonce-application-update-application-wont-start
Related
I have published my .net 5.0 WPF application to a UNC network directory. From there I ran "setup.exe" to install the appliation on my computer. Then when I ran the application it showed the "verifying application requirements" dialog which then disappeared without launching the application.
Running the application directly from the exe from the UNC path works fine. I have investigated this and it looks like it might be a case of this issue here:
ClickOnce Application Won't Open
Which points to a solution of selecting thee "after the application starts" option in the "Application Updates" window. The problem is I can't select this. Clicking the radio button "After the application starts" shown in the image below does nothing:
Why can't I select this?
It turns out that the "After the application starts" option is no longer supported in after .NET Core 3.0:
https://learn.microsoft.com/en-us/visualstudio/deployment/choosing-a-clickonce-update-strategy?view=vs-2019
For .NET 3.1 and newer applications, checking updates before the application starts is the only update option supported.
This doesn't help me resolve the issue of why my clickonce application won't start but at least I know why this option is unavailable.
I have this simple piece of code, adding my application to run when windows start. Works fine.
RegistryKey rk = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
rk.SetValue("my_app", Application.ExecutablePath);
Then I package it with a Windows Application Packaging Project, connect it to windows store, choose "Create App Packages.." and get the resulting .appxbundle.
Fine so far. I install it locally. (also installing the generated certificate (.cer) so I can install it at all.)
Once I start the installed app and click a button running the code above, nothing changes in the registry! It does not crash, I have a try..catch around the code. It just silently ignore it.
Running it from visual studio works fine, the registry gets updated.
Actually, all I want is the app to start when windows start, I am not particularly interested in how to achieve that, so any ideas are welcome!
Edit: I forgot to say the most important stuff: It is a Windows Desktop, Windows Forms App. It is not a UWP app, but a window inheriting an ordinary System.Windows.Forms.Form, compiled with x86.
Xavier mentions the StartupTask extension, it's a nuget package but it seems to be used when you have a UWP app.
Actually, all I want is the app to start when windows start, I am not particularly interested in how to achieve that, so any ideas are welcome!
You need to use the windows.startupTask Extension for your packaged UWP app. Please see Start an executable file when users log into Windows. With this extension, you can start your app whenever a user logs on.
Please note: The user has to start your application at least one time to register this startup task.
After installing my application from the Microsoft Store, a popup comes up and asks the user gets if he wants to start the installed appliation. However my application fails to start when launched this way. It does not have the same problem when launched directly or via the Start button inside the Microsoft Store applicaiton. The problem is i am not able to reproduce this scenario in my debuging flow. How can i debug this? Is this a known bug? I have not had this problem with other applications.
The image below shows the type of dialog that popus up after installation. When i click Starten (start). The application does not launch
I have publish ClickOnce application in file network. After installing application and there is created shortcut.
When I launch application nothing happens, there is glimpse of process in task manager and nothing happens.
But some of my other ClickOnce application works fine.
Only that application does nothing.
I have no idea what is happening, no error, nothing. How can I handle this problem?
Click once application gets installed locally in this path -
c:\users\username\AppData\Local\Apps\2.0\obfuscatedfoldername\obfuscatedfoldername
You can go to this path - by typing in run command: %appdata%\..\Local\Apps\2.0
Delete the contents of this folder and re-open the click once to re-install it.
Check if the application gets freshly installed.
Try opening from that location directly.
If the application has logs, check it
If not check the event log for clues.
I have created a windows application using c# VS express 2012. The app works great in the VS environment. I have published the application using VS(ClickOnce) to the Desktop as an offline application, which does not check for updates. The app is not signed and security is disabled. The application seems to install fine when I run the setup.exe file. However, when I try to run the program from the start menu nothing happens. In the task manager, a process for the application appears for a few seconds then just goes away. The app window doesn't show and there aren't any indications of an error. If I navigate directly to the .exe of the app (%userprofile%\appdata\local\apps\2.0\%random id%......) and run it that way, it starts up and appears to function as designed. I've done some research and found that certain drivers and software (if installed) will cause this behavior (i.e. Kensington Mouse driver and Provencia software(?)). I've checked and I do not have either of these installed. Any help with this will be much appreciated.
Thanks in advance.