ClickOnce windows application will not start - c#

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.

Related

.appxbundle cannot modify the registry

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.

Native iOS app built in Xamarin/Visual Studio opening then instantly closing

Our company has a native iOS app that was built in Xamarin/Visual Studio. We originally uploaded it to the App Store a few years ago and have made a few changes to it over the years.
The app itself is very basic. It's basically just a web view that navigates to a Single Page Application. There is very little native app code in the project.
Every week or so I regular launch the native app on our company iPad. Instead of running a version pulled down from the App Store, I periodically rebuild and upload the app from a Mac Mini running Visual Studio and/or debug it directly from the Mac Mini through Visual Studio.
A few days ago I tried launching the native app and after opening it immediately closed. I tried rebooting the iPad but the app still minimizes/closes immediately after opening. If I double-tab the Home button on the iPad, I can see the app still running in the background, but any time I tap on it it immediately minimizes itself.
I tried Cleaning and Rebuilding the native app solution in Visual Studio and re-uploading it to the iPad and that didn't fix it. I updated Visual Studio (and all of its packages) on the Mac Mini, updated XCode, updated Mac OS, updated iOS on the iPad, and nothing resolved the issue.
When I attempt to debug the app from Visual Studio, it shows two error codes in the Output window: MT1043 and MT1007. The debugger always fails to attach to the app as well.
I've tried Googling the error codes and the problem itself and haven't found anything that has worked. I've tried generating a new Development Certificate and Provisioning Profile to use to sign the app when uploading it to the iPad but that didn't work either.
What's strange is that if I download the app off of the App Store it works just fine. The source code that I'm attempting to build/run right now is identical to what it was at the time it was deployed to the app store. What else is strange is that, if I spin up an iOS Emulator and upload/debug against that, the app works just fine.
I tried using a different iPad and it had the same issue. The app minimizes itself immediately after attempting to launch it.
Found the answer. Had to set the system certificate trust from "Always Trust" to "Use System Default". Same solution as provided here: https://stackoverflow.com/a/52506186/9704484

App not launching when started after Installation from Store

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

visual studio 2013 needs internet connection to load symbols

I have created an application that needs to run on a standalone machine that has and cannot have any internet connection.
Everything was going well until I tried to run the app in visual studio 2013. I have found that I need to be connected to the internet when I first run the app in the IDE. The issue is that it seems to need to load symbols from application extensions. I have used a few extensions, xceed WPF toolkit, BrainboxesIO, Log4net, SnmpSharpNet. After the app runs once it doesnt need to happen again until I reboot my machine. How can I prevent the need for internet connectivity, firstly whilst developing in the IDE.
I have tried to deploy my app. I can create a setup project. But as soon as I use the configuration manager to go to release, I lose reference to the same extensions. If I create a .msi in debug the app runs, but again needs the internet when it first runs. I can then disconnect and it runs provided I don't reboot, which is obviously not what I need.
Anyone have any idea what I'm not doing right?

Why doesn't my WPF application show up?

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.

Categories

Resources