Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot Build Universal App in Visual Studio 2015

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.

like image 213
Matt Avatar asked Mar 26 '16 04:03

Matt


People also ask

Which version of .NET does UWP use?

NET Standard is supported on UWP. The . NET Standard documentation provides information on which .

Does UWP support .NET 5?

NET 5/6 will not be coming to UWP project types."


1 Answers

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

like image 165
Alexej Sommer Avatar answered Oct 17 '22 10:10

Alexej Sommer