14
votes

I am unable to build Windows Universal Apps in Visual Studio 2015. The application fails to start and shows this JIT debugger window:

Occurs immediately after launch There is a similair issue on StackOverflow that I cannot find but will continue to look for. One of the possible fixes was to switch to targeting 8.1 and then switch back, but I am unable to target 8.1 for any universal app. Debugging the program reveals the following details:

Exception thrown at 0x7523DAD8 (KernelBase.dll) in APP_NAME.exe: 0x04242420 (parameters: 0x31415927, 0x558B0000, 0x004FF1D0).

Unhandled exception at 0x00007FFF60BB1F28 (KernelBase.dll) in WWAHost.exe: 0x00000004: The system cannot open the file (parameters: 0xFFFFFFFF80004005, 0x0000000000000005).

WWAHost.exe has triggered a breakpoint.

I think it has something to do with the WinMD file (specifically this line)

<Error Condition="'$(_TargetPlatformMetadataPath)' == ''" Text="Could not find an existing platform WinMD location" />

But I'm not sure how to set the _TargetPlatformMetadataPath or anything like that or where it would be set.

Here is an image as well, as you can see the application fails to load entirely and displays a big X instead of any actual content: Application fails to load with a Win32/Kernel exception


Here's what I've tried:

  • Restart and Repair Visual Studio 2015
  • Remove, restart, reinstall Visual Studio 2015
  • System restore (uninstall apps and reinstall Windows 10)
  • Clean & Build Remove compile directories (bin)
  • Create a new project
  • Download a project/template
  • Enable Windows 10 Developer Mode
  • There is no nuget package config file

I can build other project types without any issue, it seems to only be an issue with Universal apps. I should also note, this issue occurs if the project is brand new or if I've added content to the apps UI. The designer also fails with System.Runtime.Remoting.RemotingException or a System.Runtime.InteropServices.COMException seemingly randomly.

I have not been able to find any truly similar issues anywhere. I can select Universal App as a project type, but if I click compile it fails no matter what. I'm at my wits end here and am open to any suggestions, thanks everyone.

1
Which Win10 Build and which VS2015 version do you use? For Win10 Ver1511 use VS2015 Update1 - magicandre1981
@magicandre1981 It's Windows 10 (1511 Build 10586.164) and visual studio community 2015 14.0.24720.00 Update 1 - Matt
Does your application definitely target Windows 10, because this same error has been seen when trying to run Windows 8 apps on Windows 10 - Glen Thomas
@GlenThomas Yes it does, that was one of my earlier trials. I set the target through the project properties and manually by changing the project files after that failed. - Matt
Did you attempt to upgrade a win8 project to win10? - Glen Thomas

1 Answers

3
votes

If nobody minds I'll post it like an answer (may be will be needed for someone else)

There was a bug in Windows 10 versions under Build 14295.

If you change default save location disk from C to another one in Settings - System - Storage - you will be not able to debug UWP apps in Visual Studio.

Upgrading system to latest should resolve the problem