Reputation: 942
So when I start my UWP application I briefly get a splash screen and then an exception is thrown at:
mscorlib.ni.dll!System.RuntimeTypeHandle.GetTypeByName(string name, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool loadTypeFromPartialName) mscorlib.ni.dll!System.RuntimeType.GetType(string typeName, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref System.Threading.StackCrawlMark stackMark) mscorlib.ni.dll!System.Type.GetType(string typeName, bool throwOnError) mscorlib.ni.dll!System.Resources.ResourceManager.GetWinRTResourceManager() mscorlib.ni.dll!System.Globalization.CultureInfo.GetCultureInfoForUserPreferredLanguageInAppX() mscorlib.ni.dll!System.Globalization.CultureInfo.CurrentCulture.get() mscorlib.ni.dll!System.IO.FileLoadException.FormatFileLoadExceptionMessage(string fileName = "System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", int hResult) mscorlib.ni.dll!System.IO.FileNotFoundException.SetMessageField() mscorlib.ni.dll!System.IO.FileNotFoundException.FileNotFoundException(string fileName, string fusionLog, int hResult)
There's no futher details other than "Exception thrown: 'System.Exception' in mscorlib.ni.dll".
Running a different UWP app such as the UWP blank template app works fine but this app specifically seems to have this problem.
I can reproduce the problem with a cut down version of my app that if needed can be downloaded here.
Upvotes: 2
Views: 4052
Reputation: 942
So turns out that my App Package was corrupted or something so I deleted the package from [%localappdata%\packages]. You can find the your package name in the package manifest under the packaging section.
I figured this out by looking up the error I was getting in my event viewer which Microsoft's KB said that I should recreate my user account on the machine so that I'd get a new packages folder. But I found that simply deleting your project's package fixes it.
Upvotes: 1