Lately I had just moved a Universal Windows Platform app running on .NET Core to another workstation to continue developing a client’s application. Unfortunately, when debugging the applicaton, I found a new bug. Recently another developer submitted a bug report to Microsoft dealing with this same problem. However, they have not come back with a solution yet. After hours of hair pulling as I needed to meet a deadline for the project, I found a work around.
The Issue
This bug will not allow you to debug or publish your UWP app. When loading up a project in Visual Studio and building to debug, an DEP0800 error comes up.
Further inspection in the output pane, we get the following.
Visual Studio is complaining the Microsoft.NET.CoreRunetime.2.2.appx is not installed. It couldn’t automatically install during the build process as well. So I investigated further. I went to the appx location and tried to install manually.
It’s location is “C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86.microsoft.net.uwpcoreruntimesdk\2.2.10\tools\Appx\”
During manual install I noticed why Visual Studio could not install the package itself. “Deployment of package Microsoft.NET.CoreRuntime.2.2_2.27902.3_x86_8wekyb3d8bbwe was blocked because the provided package has the same identity as an already-installed package…“
Windows alerted that the package was already installed. But I wanted to check myself.
Get-AppxPackage -AllUsers
As you can see the package was installed in the app list. Hmm… So I decided to re-install.
Remove-AppxPackage -Package Microsoft.NET.CoreRuntime.2.2_2.2.27902.3_x64__8wekyb3d8bbwe
Add-AppxPackage "C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86.microsoft.net.uwpcoreruntimesdk\2.2.10\tools\Appx\Microsoft.NET.CoreRuntime.2.2.appx"
The install gave no complaints, but when I went back to build the solution in Visual Studio I still got the same issue.
Fixing the issue
So the appx was not showing up when listing the installed appx packages, there must be a collision or the appx was installed in a different location. It turns out that installing the Microsoft .NET Core SDK 2.2.7 (x86) individually was the problem, instead of letting Visual Studio Installer fetch the SDK.
I right clicked the start menu and selected “Apps and Features”. In the list was Microsoft .Net Core SDK 2.2.7 (x86), so I uninstalled it.
I then went back to “C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\runtime.win10-x86.microsoft.net.uwpcoreruntimesdk\2.2.10\tools\Appx\” and tried to reinstall the Microsoft.NET.CoreRuntime.2.2 appx.
Voila! The Microsoft.NET.CoreRuntime.2.2 installed without issue this time. I went back into Visual Studio to build and debug the application and everything worked out with no errors this time.
As of now this looks like a Microsoft issue when installing Microsoft .NET Core SDK 2.2.7 individually and with Microsoft Visual Studio installer. After all this, it seems that the packages are versioned the same but different code inside. After scouring the internet for a solution and met with no help, this seems to be the only workaround.
Many thanks, you made my day 👍
You’re welcome.