Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't deploy universal app to phone with Windows 10 Mobile Tech Preview

I have a developer unlocked Lumia 635 just yesterday updated to Windows 10 Mobile Technical Preview (OS version: 10.0.12562.84).

After creating "Blank App (Windows Universal)" targeting Windows Phone 10 in Visual Studio 2015 RC and tried to deploy it to the device (and have changed configuration to ARM for that exactly purpose) I've got this error:

Error : DEP0001 : Unexpected Error: A Prerequisite for an install could not be satisfied. (Exception from HRESULT: 0x80073CFD)

After quick look at the app "references" it is turns out there are some of them specific to Application Insights (and few others) with disregard to the fact that I've specifically unchecked the Application Insights integration on project creation dialog before (surprise!). So I've removed them all leaving only the following (seems like unremovable):

  1. Analyzes
  2. .NET for Windows Store apps
  3. Windows Universal

But this didn't help, unfortunately - still can't deploy this "default" app to the phone.

Though, deployment of my current working universal app that target Windows Phone 8.1, to this phone was just flawless.

Working OS is Windows 8.1 Pro, if that matter.

Update

Strike-through text above is not important anymore, see accepted answer.

like image 713
Sevenate Avatar asked May 01 '15 17:05

Sevenate


People also ask

Why is Phone Link not working?

For some Android devices, your Battery Optimization settings may interrupt your connection. We recommend turning it off in the Link to Windows app on your Android device. Open Android Settings > Apps & notifications > App info > Link to Windows > Advanced > Battery > Manage Battery Usage > Battery optimization.


4 Answers

I'm on the .NET/UWP team. The official answer from Microsoft is here:

https://msdn.microsoft.com/en-us/library/windows/apps/dn706236.aspx?f=255&MSPPError=-2147217396

Let me write out the steps from that link above. These steps apply today (May 20th 2015, using VS2015 RC that was released at BUILD.) Deploying to mobile was not possible prior to May14, when the correct build of Win10 Mobile came out.

Your machine should be running Windows 10, build 10074 or higher, from here: https://insider.windows.com/

  • I installed it "clean" on my SurfacePro1. To do this, first download the ISO of Windows10 from http://windows.microsoft.com/en-us/windows/preview-download, and then use "Rufus" http://rufus.akeo.ie/ to create an installable USB image from the ISO. Within Rufus, for my SurfacePro1, I had to choose "FAT32" and "GPT for UEFI". I don't know what you need on other machines.

Install VS2015 RC from here: https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx

  • During installation, you get to choose which components to install. You should choose "Windows 10 tools and emulators". Installation takes from one to several hours.
  • It will install Windows 10 SDK version 10069.
  • There are some glitches with the installer. If you go back to AddRemovePrograms and modify which components of VS2015 RC are installed, then it ends up installing more than it really should.
  • When VS runs for the first time, it asks if you want to sign in. I always used to click "no" and it'd then ask me more configuration questions. But if I answer "yes" and I sign in, then it bypasses all those configuration questions, and ends up being quicker. Lesson learned: I now always sign in.

You can run Win10 apps upon emulators. The emulators came with the Win10 SDK, and so are running version 10069 of the Win10.Mobile operating system.

You can run Win10 apps on your local machine. To do this you local machine must be Win10.Desktop version 10074 or higher and must be unlocked.

  • Instructions for unlocking are at https://msdn.microsoft.com/en-us/library/windows/apps/dn706236.aspx. Here's a "TL;DR" version:
  • Run gpedit.msc > Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > App Package Deployment. Then right-click to enable two things,
  • "Allow all trusted apps to install"
  • "Allow development of Windows Store apps"

You can run Win10 apps on your phone. To do this your phone must be Win10.Mobile version 10080 or higher (which came out on May 14th). Your phone must be unlocked.

  • Instructions for unlocking are at https://msdn.microsoft.com/en-us/library/windows/apps/dn706236.aspx. Here's a "TL;DR" version:
  • Plug your phone in by USB. Run "Windows Phone Developer Registration" tool from your desktop.

The key fact about Win10 is that you can write software against one particular SDK (e.g. the 10069 SDK that came out at //BUILD), and still run it on a more recent version of Win10 (e.g. 10074 that's current for Win10.Desktop program, or 10080 that's current for Win10.Mobile insider program).

In the .appxmanifest file, MinVersion="10.0.10069.0" says that your app will refuse to deploy to any machine which is running a lower version of Win10.

In the .appxmanifest file, MaxVersionTested="10.0.10074.0" says that if your app is deployed to a machine which is running a higher version of Win10, then it might have to do "quirking".

Both of these things are controlled by the Project>Properties dialog, and are actually stored in the .csproj/.vbproj.

The answers by @user4855870, @Rexobias and @Sevenate were hacks. They were sticking in an artificially low version for MinVersion to work around the fact they hadn't yet updated their devices. That's a fair approach (and I did it while I was waiting for Win10.Mobile 10080 build to be released). But now that it has been released, there's no need for these hacks, and you should just update your device.

like image 57
Lucian Wischik Avatar answered Oct 14 '22 04:10

Lucian Wischik


I found that: Solution Explorer -> Right click on project -> properties -> debug -> on start options -> target device: choose device and save.

Deploy again!

Hope this helps!

like image 22
Lê Thành Trung Avatar answered Oct 14 '22 04:10

Lê Thành Trung


In Package.appxmanifest try changing the TargetDeviceFamily to the following:

<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.1.0" MaxVersionTested="10.0.1.0" />
like image 39
user4855870 Avatar answered Oct 14 '22 03:10

user4855870


I just faced the same problem described by @Sevenate.

Following the response of @user4855870 I'm finally able to deploy my blank Universal App to my Lumia 520 running W10 TP.

1) On the phone, go to Settings, System, About, More Info and write down the OS version (in my case it is 10.0.12534.59);

2) On Visual Studio, open Package.appxmanifest and in the same line mentioned by @user4855870 on the "MinVersion" write "10.0.1.0" and on the "MaxVersionTested" write the OS version you got from your phone.

<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.1.0" MaxVersionTested="10.0.12534.59" />

My blank Universal App works on computer and phone as it should ;)

like image 23
Rexobias Avatar answered Oct 14 '22 02:10

Rexobias