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
Related
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.
I ran into the following issue:
Installed client app v4.3.1.0 via .appinstaller
Upgraded the server to v5.3.1.0
Clicked to launch the client app and was prompted to Update
Clicked the Update button
While the update was running, I clicked "Cancel"
Now the app happily launches as v4.3.1.0 and no longer checks for updates.
I have tried restarting the PC and I have checked with Fiddler to verify no calls are being made to the server. It's like Windows has forgotten that the app was installed via the App Installer. I had to manually run the .appinstaller to get the app to v5.3.1.0, after which it began looking for updates on launch again.
Here are my configured update settings:
<UpdateSettings>
<OnLaunch HoursBetweenUpdateChecks="0" ShowPrompt="true" UpdateBlocksActivation="true" />
<AutomaticBackgroundTask />
<ForceUpdateFromAnyVersion>true</ForceUpdateFromAnyVersion>
</UpdateSettings>
A similar issue was fixed in Windows 1903 ( Build 18362). If you're using an earlier build, updating your OS to Build 18362 or greater may resolve the issue.
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
I have a WPF application developed and been testing already for a few months.
When it's installed on the client's computer the application starts and no window is visible. The task manager shows the application is running.
The application is writing all activities in few log files and it looks like it is doing something but no visible screen.
What can be a possible cause of the problem ?
Why it is invisible on that specific machine ? The machine is Windows 7 64x bit
The installed frameworks are v1.0 1.1 v2.0 v3.0 v3.5 v4.030319
The strange thing is the application was working before.
You should check Windows Event log (Type eventvwr in run dialog or go to viewer by Computer Management dialog of Windows) to get info about the problem. The reason is most likely your application has an exception before your main window is opened. So you see that process is running in task manager but windows did not show up.
The reason in event log could be anything. May be your app requires a file in a specified path but not found. I meany anything that causes an except,on could be your problem.
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.