Problems with upgrade from a Windows Phone 7.5 project to WP8 - c#

I'm trying to maintain two versions of my app targeting WP7.5 and WP8. I started with the WP7.5 app and added a copy of the project with linked files. Then I upgraded the "linked" project to WP8 via the Visual Studio command. When I run the WP8 app on the emulator it crashes with a System.InvalidOperationException in System.Windows.ni.dll when executing a MessageBox.Show() command. The output windows shows a FileNotFoundException in mscorlib.ni.dll before the error message previously mentioned.
I tried adding mscorlib.dll to the WP8 project, but VS tells me it's already referenced. I also tried setting all capabilites in WMAppManifest as seen in similar threads but the problem is still alive. Can anyone give me a hint?
Below is my output after execution. I hope you don't mind the german.

Windows 8 Windows Phone 8: In Windows Phone 8 if you call Show method from the app Activated or Launching event handlers an InvalidOperationException is thrown with the message Error Displaying MessageBox. Alternatively, you should call the Show method from the Page.OnNavigatedTo(NavigationEventArgs) method.
Found that in MSDN and this applies to my situation. That was exactly my problem.

Related

Unable to activate Windows Store app. The activation request failed with error 'Access is denied'

UWP program that used to work fine does not want to start. When starting the app from Visual Studio 2017 the error message is:
Unable to activate Windows Store app '{guid-name}'. The activation request failed with error 'Access is denied'.
Windows Event Viewer displays the following error:
Activation for {guid-name} failed. Error code: Access is denied.. Activation phase: COM ActivateExtension
The app deploys successfully, but then trying to start it (with or without debugging) it fails. When trying to start from Start menu, nothing happens when I click the app icon, but when trying to start from Visual Studio it produces an error message box. How to find out what is actually wrong?
I have tried the following:
Rebooting computer
Clean solution
Uninstall the deployed app
Delete bin folder
Compile with .NET Native toolchain
The solution is on C: drive
Change package name
Change to release profile and back to debug
When I try to create a new UWP app, it works fine, so this is most likely solution-specific error, not something wrong in the computer itself.
Usually this happens when there is an App with the same GUID as the one you are trying to Install/Debug. I would try to find the existing App, uninstall it, and try to deploy/debug again.
I had the same problem when creating a blank Xamarin.Forms app targeting UWP. The solution was to create an exception for my app in F-Sscure which would otherwise block it.
I had a similar error message to this, but my error was that a Nuget package had a different package version to my App.
"App" had dependency "B" version .14
Dependency "A" had dependency "B" version .13
i don't think this will solve this particular issue but it solved mine and i couldn't find solution to this anywhere.

MvvmCross support for Windows 10 apps(UWP)

I have created Windows 8.1 app with mvvmcross. Now I have migrated the same app into windows 10 (UWP) app. I am not getting any mvvmcross reference issue.
While running the application I am getting splash screen, after some minutes I am getting below error :
An exception of type 'Cirrious.CrossCore.Exceptions.MvxException'
occurred in Cirrious.CrossCore.dll but was not handled in user code
Additional information: Could not find plugin type in assembly.
I have done step by step debug solution the Setup. Initialize() method is not calling while app launch.
Can you please let me know? Is mvvmcross library compatible with windows 10 apps(UWP)?

Windows Phone 8.1 Silverlight App Starts and immediately terminates in Debugger

I have a Windows Phone 8.1 application that was just upgraded from Windows Phone 8. When the emulator starts and the app fires up, it immediately crashes to the app list. It doesn't get caught in the debugger at all. Just crashes hard.
The Windows Phone 8 version works fine and I've made sure that the splashscreen.png file is part of the project and is set as content as I've seen elsewhere but I'm at a loss as to what would cause this.
Anyone know what's going on? There's nothing in any logs I can find so I can't provide any further information to assist. Sorry!
Found the Answer: When Visual Studio 2013 Update 4 updated the project, it for some reason cleared the "Startup Object" for the application which caused it to never hit any code which was why this was happening.
Setting this again to the only option fixed the problem. Of course this should compile-time fail with an error but it doesn't, so if you get this issue that's likely why.

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!

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

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.

Categories

Resources