19
votes

I started a new Solution to try the Universal Apps. To test my code I want to add a unit test project (windows phone 8.1), but if I do so I get this error message when I start a unit test:

Error : DEP0700 : Registration of the app failed. Windows cannot install package 808f4bed-6f93-48b9-9b63-071d68456607 because this package requires a higher Windows version. The package requested Windows version 6.3 with AppModel version 1, while the current Windows version is 6.3 with AppModel version 0. (0x80073cfd)

error message

What does this AppModel version 1 and AppModel version 0 mean, and how can I fix this?

Or is there and another way to do unit tests in the context of Microsoft Universal Apps?

This is what my project structure looks like

enter image description here

Update

Windows Phone 8.1 Project + Windows Phone 8.1 Unit Test = don't work Windows Phone 8 Project + Windows Phone 8 Unit Test = works

But I still don't have a clue how I can get the Windows Phone 8.1 to work.

btw my windows version (Windows 8.1 Update)

PS C:\Windows\system32> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
6      3      9600   0
2
I just tried the same and didn't have any issues. Make sure you are using the 512MB emulator - the other's don't work for me because I don't have Hyper-V enabled properly or something.RichC
Do you get this when trying to run via R#?Derek Beattie
Judging by the number of upvotes, this is a common problem. I'm experiencing exactly the same issue on a laptop, but another system runs just fine with a slightly earlier version of the codebase. I've added a few files and a reference to MVVMLight PCL, but removing that reference didn't help.Jay Borseth
Do you have resharper installed? if you do "normaly" it should allow be able to run your unite tests for you. Resharper-> Unite Tests -> Run Unite Tests (CRT+U,R)Damien
FWIW I have unit tests running just fine in my universal app. I don't know the error message you're seeing though.Brian Rasmussen

2 Answers

2
votes

On Universal Windows App msdn site I see following note:

Note These samples require Windows 8.1 and Microsoft Visual Studio 2013 with Microsoft Visual Studio 2013 Update 2 or later. They don't compile in Microsoft Visual Studio 2012 for Windows 8

I checked my own current Visual Studio Installation 'About' page and see that I have VST 2013 Update 1. Maybe you have to explicitly update your Visual Studio version, it doesn't seem to happen by default.

I also checked the Microsoft Visual Studio 2013 Update 2 download page and that explicitly states

It includes tools for Windows Phone 8.1 development.

1
votes

It seems like this is not a problem of Visual Studio, but rather Resharper or some other tools, which want to make unit testing easier.

In my example, see this context menu screenshot. I always used the "run unit tests" command in the lower part, which resulted in the error message. Using the upper ones starts the emulator fine and runs the unit tests on the platform.