"The app didn't start" after adding Windows Phone 8.1 - c#

I am currently two days into this bug and can't seem to find the cause. I relatively recently installed VS2013 Update 2 RC and started building the Windows Phone 8.1 version of my WinRT app. I have been slowly moving files (mostly Converters/basic resources and pages) over to the Shared project and haven't had too many issues with it.
The Windows Phone 8.1 app builds and runs (though, with some issues that I still need to iron out). My WinRT app, which I haven't changed at all (except for some of its dependencies) aside from moving some things to the Shared project, will not start at all. It throws up "The app didn't start".
So far I've tried slowly moving files back out of the shared project and into the main WinRT project, but still to no avail. My hard drive is not encrypted with TrueCrypt.
One other thing to note is that in the same moves toward Windows Phone 8.1, I also changed my Portable Class Library to target both WP8.1 and Xamarin (iOS and Android).
I haven't been able to get any debug results because any time I start it debugging, it fails with "The app didn't start" error. No exceptions are thrown in the output, even when running the Native/Mixed debuggers. Also, no breakpoints get triggered, even in the App constructor.
I have read that this could be caused by permissions issues. I have checked and double checked all permissions in the prescribed places and registry entries and found no deviations.
One other thing I should note is that this seems to only happen with my application. All other apps seem to run fine.

I figured it out! Based on what I read here, the issue was with a file app.config in my project.
From what I've been able to see, app.config seems to be entirely superfluous. I believe it to be a relic from original Windows 8 applications. I haven't had any issue with it up until now, when it seems Nuget changed the contents of it to reflect some updated app packages.
Excluding this file from the project solved the issue.

Related

Xamarin Won't Build on Physical Devices

I'm building a Xamarin app, and, so far, I've been able to build without issue on the iPhone Simulator, but I haven't been able to get the app to launch successfully on a physical iPhone device. In the past (about a month ago), the app was working fine on the same device. Here's some background on the specifics:
I develop my Xamarin code on my Windows machine, which is linked a remote Mac (hosted by MacStadium, a third-party hosting service).
My test phone is an iPhone 5c running iOS 10.3.3
To deploy to my iPhone, I build my app in Release mode in Visual Studio, upload the code to a third-party app installation service, Installr, which hosts the IPA file and assists with the installation of my app on the physical device. I've never had an issue with Installr and have no reason to believe that this is the source of my problem.
Since the last time the app worked on the physical device, I updated Visual Studio to version 16.3.2 and updated Xamarin. Here's the Xamarin Specs:
Generally, what happens, is that I download and install my app on the iPhone without any issue. However, when I click on the app, the splash screen loads for about 5 seconds, a white screen briefly appears as follow, then the app crashes.
I've seen several related articles on StackOverflow and other sources on the internet, but none of the proposed solutions see to work for me. For example, I've tried adding [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
to App.xaml.cs with no luck.
I've also played around with changing the CSProj file settings to compile for various combinations of ARM64 and ARMv7. Changing this didn't help either. I've tried changing the linker behavior to "Don't Link" from "Link Framework SDKs Only", and I get an error message stating that the native code is too large for 32-bit architectures. I would compile for only 64-architectures to get around this error, but I believe that the iPhone 5c uses a 32-bit architecture.
Here's what my iOS Project's CSProj file looks like currently. I've tried checking just about all of those checkboxes with no luck:
I'm stumped as to what this could be. Any suggestions would be greatly appreciated. To further complicate things, I haven't been able to get a good log file from the iPhone. Since the Mac is remotely hosted, I can't plug my phone into XCode to pull the logs that way. Does anyone have a reliable solution to get log files another way?
It looks like upgrading solved the problem. Visual Studio was updated to Visual Studio to 16.3.5 from 16.3.2. XCode on my Mac was updated to Version 11.1. After these updates, Visual Studio performed an update while connecting to the Mac remotely.

App crashes after installing a Xamarin-Forms app

I have 3 self-written apps on my phone. 2 written with Xamarin.Android and one written with Xamarin.Forms. But there is a big problem. It always work only 2 or 1 app depending on which of the 3 apps was installed last. If one of the two Xamarin.Android apps was installed last, then both Android apps work. The Forms App, however, crashes immediately. Same the other way around. If the Forms app was installed last, it works fine. The two Android apps crash immediately.
Is there any reason for that? Are the frameworks not compatible?
I had the same problem trying to install the apk from Debug folder.
Steps that worked for me:
- Disable "Use Shared Runtime"
- In Advanced Settings, Select supported architecture
Check the screenshot if not clear
If you are deploying a debug apk into the same device, with different Runtimes, when the apk is installed will remove the previous / override. So, you will need to: disable Shared Runtime, or make sure the dependencies are all the same in all the applications
If you are using visual studio then Check "Application output" with release on device.
In Application Output you can see if any exception is causing problem..

Windows Phone 8.1 app crashing on startup

I'm having a frustrating issue developing for Windows Phone 8.1 and hoped somebody might have lived through the same thing.
I've had the app running on my phone from a few different deployment packages I created. I recently started deploying directly from VS to my phone when debugging. Everything is working fine. However, when I try to run the app without VS attached, it crashes after the splash screen, with no exception details given. It simply closes.
I've added a handler to the UnhandledException event that will output exception details to a dialog, but this is not displaying anything. The crash only ever occurs when starting the app from the phone.
I reverted to creating a deployment package and deploying that using the tool. However, this version also crashes on start with no message.
Weirder still, I've used one of the deployment packages that had been working fine, and I get the same error: crash, with no message.
I just don't understand this behaviour. Why has an old package that used to work stopped working? I'm using roaming data and considered it might be to do with that, but I really have no other ideas. Please help!

User files in IsolatedStorage being lost in Windows Phone 8 app

I'm developing my first Windows Phone 8 app and notice that occasionally when Visual Studio 2012 pushes a new debug version of my app to a physical device that user files in IsolatedStorage are being lost.
This doesn't happen all the time.
I've only noticed it happens when I've not done any development for a few days, make some changes, then debug against the physical phone.
Any idea why my user generated files may be getting lost?
I haven't noticed a pattern yet.
I've tried doing tests where I change version numbers in AssemblyInfo.cs and WMAppManifest.xml, but this doesn't seem to trigger the issue.
I'm a little concerned that when I release the app and provide upgrades then live users may end up losing their data.
Any advice would be greatly appreciated.
When you do a rebuild in Visual Studio then start debugging, your app will be uninstalled (which will remove all files in iso store) then reinstalled.
You don't need to worry when you publish your app to the store. If you deploy an update through the store, your app will be updated (instead of uninstalled then reinstalled) and all files should stay intact.

InkAnalyzer throws FileNotFoundException on Vista deployment

I have a WPF C# application that makes use of the InkAnalyzer class. On my development platform (Windows XP), I have added references to IACore.dll and IAWinFx.dll for the project before building the release.
However, when I tried to run this on a HP TouchSmart tablet PC (on Windows Vista), the application throws a "FileNotFoundException". Offending file name is IACore.dll.
Next, I selected the "Copy Local" option for both files, and rebuilt the application. However, once that is done, yet another file is not found. This time it is "IALoader.dll".
I realise that I must be missing something on the HP TouchSmart (on Windows Vista). Is the Vista laptop missing a SDK?
A Solution
I couldn't find IACore.msm anywhere on my SDK, and it's a recent SDK (XP Tablet PC SDK version 1.7), so I used Search to find the IALoader.dll, and manually copied it to my application's folder. No more complaints after that.
However, if there's a way for me to avoid bloating my application deployment with these files, it would be great. Thanks for your help, Jared!
Looks like this problem was encountered by a few other people as well. The basic problem is that the assembly is not installed in the GAC but in the Windows SDK directory. In order for your application to ensure it's loaded it must include the IACore.msm in the setup project or manually install the framework.
Full Thread:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/719cbbde-013e-4165-b694-6a994d833352/

Categories

Resources