Can't Deploy Universal App to Windows Phone 10 Technical Preview

11,351

Solution 1

For me I had to turn on the Windows Phone ip over USB Transport

go to run -> services.msc -> [look for it].

Solution 2

If any of these answer not solved your problems, here is what I've done:

  1. Reset the phone (it's dev phone, so it's okay to reset, not losing any data)
  2. DO NOT choose recovery. Start clean
  3. After all waiting (installing app, get settings set), plug it in and try to deploy again.

And it's just worked

The idea come from: https://social.msdn.microsoft.com/Forums/en-US/d2340565-a80a-4f1c-8a0c-ba8ad5ce34b1/cannt-deploy-wp-81-app-to-phone-using-vs-2013-error-dep0001-unexpected-error-element-not?forum=wptools

Solution 3

What worked for me was resetting the phone to factory defaults ( and erasing all data... a true reset). The phone came with 8.1, when I reset it however, it was reset to windows 10 base. I re-enabled developer mode on the phone and I can deploy my apps to the phone now.

I had tried all the other suggestions with no luck.

Solution 4

Apparently 10.0.10166.0 is a pre-release Mobile Insider Preview Build. You just need to decrease Target Min version to 10166.

Unfortunately, you can't do this from Project settings. Bu you can do it manually. Follow these steps (Worked in my case with Nokia Lumia 520 Windows 10 Mobile Insider build 10.0.10166.0):

  1. Right click on your project in Visual Studio.
  2. Select "Unload Project", it will now appears as ProjectName (unavailable).
  3. Right click on the unloaded project and select "Edit ProjectName.csproj"
  4. Locate the <TargetPlatformVersion> and <TargetPlatformMinVersion> items in the first <PropertyGroup>.
  5. Change the <TargetPlatformMinVersion> value to 10.0.10166.0.
  6. Now Save and Close the file.
  7. Right click on the project again and select "Reload Project"
  8. Rebuild the project and deploy to device.

Solution 5

When I tried to deploy my app in Release mode to Windows Phone 10 I got the following error:

Error : DEP0001 : Unexpected Error: Element not found. (Exception from HRESULT: 0x80070490)

I tried a few things but what ended up working was quite simple: I built and ran the Debug mode of my app. Then without uninstalling the app I switched the configuration to Release and built and ran it on the phone and then it worked!

Share:
11,351
kernanb
Author by

kernanb

PM at Microsoft that likes to dabble in C#. Originally from Ireland.

Updated on August 05, 2022

Comments

  • kernanb
    kernanb over 1 year

    Here's the details:

    • Created a blank Universal Windows App in Visual Studio 2015
    • Set to ARM, Debug
    • Attempt to deploy to a Lumia 925 Running Windows 10.0.10166.0
    • Phone is in 'Developer Mode'
    • I unlocked the phone using the Windows Phone Developer Registration (8.1) tool. Do I need one for Win10?
    • I first get the following error:

      Error : DEP3321 : To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.10240.0 or higher. You currently are running version 10.0.10166.0. Please update your OS, or change your deployment target to a device with the appropriate version.

    Now I found a solution for this first error here so I changed the following in the App1.csproj file:

    <TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
    

    to

    <TargetPlatformMinVersion>10.0.10166.0</TargetPlatformMinVersion>
    

    Now I get the following error when I try and deploy the app to the phone and I can't find a solution:

    Error : DEP0001 : Unexpected Error: Element not found. (Exception from HRESULT: 0x80070490)
    

    Anyone have any idea how to resolve this? I can deploy the app fine to the emulator, just not to my physical phone running Windows 10.

    • ILOABN
      ILOABN over 8 years
      Unfortunately I don't have a solution to that problem. Just wanted to say that there's not anything like the "Windows Phone Developer Registration" for Win10, Developer Mode is enough. We're also able to deploy a new solution for 10240 on a phone running 10166 using the technique you described. Took a look at the csproj file and couldn't find anything obvious you could change :/ Mind sharing the empty project you created?
    • kernanb
      kernanb over 8 years
      How can I share the project? The project is literally a blank one - I just change that one line in the csproj file. I suspect there might be something funky up with my phone. I should be able to get access to another Windows Phone 10 today, so I'll test it out on that one.
    • ILOABN
      ILOABN over 8 years
      Alright, I hope that works for you. If that still doesn't work I could possibly share an empty project of ours that compiles and run on 10166 for you to test.
    • ILOABN
      ILOABN over 8 years
      I'm glad you found a reason! Maybe try doing a software reset on that 925?
    • Titus T
      Titus T over 7 years
      It was the same for me as EduLopez mentioned. Open the services view in Windows 10 and look for Windows Phone ip over USB Transport or IpOverUsbSvc and start that service.
  • kernanb
    kernanb over 8 years
    Works now. But when I stop Visual Studio and try and open the app from the phone I can't. It's grayed out and says there was a problem installing the app.
  • ecth
    ecth over 8 years
    I can't deploy on 10536 with a "usual" Visual Studio 2015 Professional. It only knows 10240 :/ Also I can't deploy on a phone with 10166, updated from the Slow Ring..
  • DeanB_Develop
    DeanB_Develop over 8 years
    Having the same problem with 10.0.10586.11
  • mehul9595
    mehul9595 over 8 years
    tried all the above workarounds nothing worked. even i got the version as @DeanB_Develop
  • EduLopez
    EduLopez over 6 years
    @djack109 try restarting the service? An also check if your windows has the correct version and settings to deploy.
  • djack109
    djack109 over 6 years
    @EduLopez "windows has the correct version and settings to deploy." what do you mean ?
  • EduLopez
    EduLopez over 6 years
    @djack109 The exception says "Windows Universal Runtime version 10.0.10240.0 or higher."