software solutions for a mobile world

Windows Phone Store submission - Error 2001 There are duplicate files in AppManifest.xaml

I have just finished a Windows Phone app, and was submitting it to store. It was a pretty simple app, but when I submitted it, I immediately got a mail message that it had failed. When I checked it up, I had an error 2001, which reads:-

2001 - There are duplicate files in AppManifest.xaml. Remove one of the files and then try again.

The explanation for this read:-

If rebuilding your XAP doesn't solve this problem, you may have to manually remove any duplicate files from the AppManifest.xaml in your XAP file. To rebuild your app, see Rebuilding your project in Visual Studio.

I looked at the AppManifest.xaml file, and couldn't see a problem

<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="Post Code Lookup" EntryPointType="Post_Code_Lookup.App" RuntimeVersion="4.7.50308.0">
  <Deployment.Parts>
    <AssemblyPart x:Name="Post Code Lookup" Source="Post Code Lookup.dll" />
    <AssemblyPart x:Name="APPAMundiMail" Source="APPAMundiMail.dll" />
    <AssemblyPart x:Name="InTheHand.Phone" Source="InTheHand.Phone.dll" />
    <AssemblyPart x:Name="Microsoft.Azure.Zumo.WindowsPhone8.Managed" Source="Microsoft.Azure.Zumo.WindowsPhone8.Managed.dll" />
    <AssemblyPart x:Name="Microsoft.Phone.Controls" Source="Microsoft.Phone.Controls.dll" />
    <AssemblyPart x:Name="Microsoft.Phone.Controls.Toolkit" Source="Microsoft.Phone.Controls.Toolkit.dll" />
    <AssemblyPart x:Name="Newtonsoft.Json" Source="Newtonsoft.Json.dll" />
  </Deployment.Parts>
</Deployment>

So I did a clean, resubmitted and the same error. I compared the xaml file to other successful submissions, and it looked the same. I scratched my head, swore quite a bit, reached out on Twitter, suspected the new updates to the store, sacrificed a chicken, but it didn't help.

I slept on the problem, and refreshed (yeah!) attacked the problem again. Still the same.

I examined the XAP file in WinRAR (remember, a XAP file is effectively a Zip file), and suddenly realised the problem.

When I start a new project, I usually create or copy in a 'Dependencies' folder, which contains dll's that are used in the project. We have our own 'About' dll, 'Mail' dll etc. When I had copied it, I had dragged and dropped it from the source folder, and copied it to the project in VS2012, not the project folder in Explorer.

Building the application, it had, quite correctly, included the Dependencies folder in the XAP file, so some of the dll's in References had been copied in the Dependencies folder.

The error message was a bit misleading, but in the end, it was user error.

I hope this helps someone else who makes a similar mistake.


Posted Apr 12 2013, 07:54 AM by Pete Vickers

Comments

rimonabantexcellence site title wrote rimonabantexcellence site title
on 07-21-2013 0:07

Pingback from  rimonabantexcellence site title

Copyright © 2014 APPA Mundi Limited. All Rights Reserved. Terms of Use and Privacy Policy. OrcsWeb's Windows Cloud Server Hosting