With Windows 10 being rolled out as I write this article, there will be updated sample Windows Platform apps available soon (today). It’s also time to update your projects.
However, you may find yourself not able to deploy to Windows 10 Mobile after updating your projects or older samples to Windows 10 (build 10240). This post will show you how to resolve this problem.
You’ll see an error something like this when deploying to a physical Windows 10 Mobile device:
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.
The error is pretty clear but how do we fix it? The resolution is with the MinTargetVersion setting.
We need to drop the lowest version your app targets to the version that your device has running, we can do this in one of two ways; through the project properties UI editor or manually edit the XML of the csproj file. I will show you how to do it manually because in some cases, the UI’s MinTarget dropdown list won’t show the lowest SDK if you do not have it installed. Below are the steps to fix it.
NOTE: Skip to step 3 if your project is already unloaded (it will show (unavailable) next to the name)
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>.
Here’s the “Before” screenshot:
5) Change the TargetPlatformMinVersion to the version that the error stated you are running. In this case, it’s 10166. Here’s the “After” screenshot:
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. Now you should be up and running!
I expect this to happen with increasing frequency as we move forward with Windows 10 SDK releases. The new paradigm is that we’ll have a set of installed windows 10 Tools, but multiple SDK versions. We need to be aware of the min version and targeted version of our apps.
If you have any questions, feel free to leave a comment below.
17 thoughts on “Error : DEP3321 – Can’t deploy to Windows 10 Mobile”
Thanks. But after changing the lines, it has the following errors:
Severity Code Description Project File Line
the error should be this one:
Severity Code Description Project File Line
Can you share the project with me, maybe put it on OneDrive or Dropbox and I’ll take a look.
I have changed the minimum target version to 1066, lets see if it works…
Make sure to target 10166, not 1066 (just in case it’s not a typo)
This worked perfectly for me. Thank you!
Thanks. Fixed the problem I was having using my Win 10 phone to debug Windows 10 Universal apps in Visual Studio 2015
Windows 10 Mobile need high requirment device
This is not true, there are plenty of low end phone models that can use Win 10 mobile. The minimum requirements for Windows 10 Mobile are; a: The minimum amount of RAM is listed as 512MB b: Minimum storage required to run Windows 10 for phones will be 4GB c: Windows 10 will support screen sizes from 3 inches all the way up to 7.99 inches
I don’t have TargetPlatformVersion in the projectName.csproj
Unload your project, the right click and select Edit csproj. You’ll find both and in the first section. If you don’t see that then your project is not a UWP app.
Then you’re not developing a UWP app and this article’s tip doesn’t apply 🙁
Thanks for Post. After changing the lines, it has the give same errors:
Error : DEP3320 : Target device’s operating system version does not meet the application’s minimum requirement. Minimum required operating system is Windows 10.0.
I am using the Lumia 930 device which has 8.1 OS. So is it possible to build and deploy my application on this device. I cant manage windows 10 device right no, So is there any other way to built the UWP project. Currently I Using the simulator for debugging purpose and its going well but I can’t able to deploy the project with simulator. It give an error:
Loading assembly “C:\Users\ngulati\.nuget\packages\System.Private.Uri\4.0.0\runtimes\win8-aot\lib\netcore50\System.Private.Uri.dll” failed. System.IO.FileNotFoundException: Could not load file or assembly ‘System.Private.CoreLib, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.File name: ‘System.Private.CoreLib, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’
Hi Mahesh, the problem you’re having is because you’re trying to deploy to a UWP package to an 8.1 device. This is not possible. However, you can deploy an 8.1 “Universal” phone app. You’ll need ot make sure you have the windows 8.1 tools and SDK installed and make sure your project was started as an “8.1” Universal application.
Thanks for Reply Now I have windows 10 device and code working in debug mode perfectally. But when i try to built app in release mode then it gives an following error like
Loading assembly “C:\Users\**\.nuget\packages\Microsoft.NETCore.Portable.Compatibility\1.0.0\runtimes\aot\lib\netcore50\mscorlib.dll” failed. System.IO.FileLoadException: Could not load file or assembly ‘mscorlib, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b77a5c561934e089’ or one of its dependencies. Strong name validation failed.
I have set Solution platform is ARM(also try with x86 and 64) but still it gives error. Have you aware with this issue. I also tried replace mscorlib.dll with version 188.8.131.52 but its also not working.
Hi Mahesh. if you clean and rebuild, do you see the error again? This error points to the nuget packages. Make sure you have the latest tools installed (1.3.1) and the latest UWP nuget package (5.1)