locked
AppManifest Error 2001 with WinRT Runtime Components

    Question

  • I have a Universal solution and a WinRT component (c++ video filter) referenced in the Windows Phone 8.1 project. It builds and runs fine, but when I go to publish to DevCenter, I keep getting a Error 2001:Duplicate file in manifest (see error list here)

    • I have examined the package contents and do not see any duplicate files in there.
    • I've tried CopyLocal=False on the WinRT component and that fails certification

    Has anyone encountered and overcome this? 

    Also note: I'm not able to directly edit the appxupload bundle because it is signed. I've tried manually removing items as suggested by the error page, but it will fail when uploaded (even before submission)

    UPDATE: Fixed publishing problem

    Although I haven’t found out the specific library/file that was being duplicated, here is what I did which resulted in a successfully published package: 

    • I rewrote all my components as one Universal c++ WinRT runtime component project
    • Instead of multiple Extensions in the app’s package.appxmanifest each with a single ActivatibleClass, I have one Extension with multiple ActivatibleClasses.

    • Followed Marcin Stankiewicz’s advice (in the Q&A section of the MSDN Media Extensions Example) and added a dummy public class (even if it is a dummy class) in the project. It appears that in order to deploy an MFT component as Release - ARM, the winmd must have something public.





    Lance W. McCarthy Windows Phone Developer

    • Edited by LanceMcCarthyMVP Wednesday, September 24, 2014 4:15 PM formatting problem, the whole paragraph went wonky
    Wednesday, September 17, 2014 8:43 PM

Answers

  • Hi Rob,

    I fixed it! Instead of making separate projects to manage my filters and shaders, I created a single Universal WinRT component with several ActivatibleClasses. That way I only have one namespace.

    So in my app's Package.appxmaniest, I only have one Extension with one InProcessServer pointing to the single DLL path. Then declare the different ActivatibleClasses pointing to the filter (which are not named with any suffixes).

    This resolved the Error 2001.If you still escalate this internally to find the root cause, please let me know what the final result was. If it happens again to me, I'd prefer not to have to rewrite my projects :)

    Thanks for the help.


    Lance W. McCarthy Windows Phone Developer

    Tuesday, September 23, 2014 10:10 PM

All replies

  • Hi Lance,
         Have you opened a Publishing case for this?  I recommend this, and if they can't help, please open a technical support case. 


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, September 18, 2014 1:16 PM
    Moderator
  • Hi Matt,

    I did contact DevCenter support, they weren't able to provide any additional details on the 2001 error. I was hoping for a detailed error log since it is an APPX package.

    I have submitted a Microsoft Professional Support ticket and provided them with the working appx and the broken appx. I'll come back and report any fixes.

    Originally, I thought I had I mistakenly added my C++ external dependencies to the solution. I should have left the needed files in the "Common" folder in the file tree and on TFS, but *not* in a Visual Studio virtual folder. So I repaired that situation, but still doesn't work. Error 2001.

    I'm starting to think Stanly Kubrick designed the error code O.o


    Lance W. McCarthy Windows Phone Developer


    • Edited by LanceMcCarthyMVP Thursday, September 18, 2014 9:59 PM spelling correction
    Thursday, September 18, 2014 9:34 PM
  • Hi Lance,

    Is the manifest in your comparison the input from your project or the one actually included in the appx?

    You can rename the generated appx package to .zip and then open it up to examine the final AppManifest.xml. That likely will include the duplicate for identification.

    You can also normalise your project and remove any unused references or using statements to make sure a duplicate there doesn't cause a problem.

    You can find previous posts on this behind this search 

    --Rob

    Thursday, September 18, 2014 10:23 PM
    Owner
  • It's directly from the packed appx. I even tried many things, but once I edit that appx package, it invalidates the signing. when I upload to devcenter, it's immediately canceled. (it knew I finagled with something).

    I went through every single class and cleaned up all references just in case. The only difference is adding the capability to the WinRt component and the project reference.

    So to confirm additionally that it has to do with the component, I went and got the Media Extensions MSDN Sample and packaged it up and tried to push it to a private beta, and viola Error 2001. You can see the exact scenario I'm having with that sample.


    Lance W. McCarthy Windows Phone Developer

    Thursday, September 18, 2014 10:52 PM
  • Hopefully, you can help with this as DevCenter support, and my MVP group has no idea what is wrong.

    Problem

    I am using a couple WinRT components in my app. Everything is working as expected deploying to phone and emulator.

    However, when I try to publish the app, I get an Error 2001 (duplicate files in app manifest). The ONLY difference between my successfully published app and the failed one is the addition of the components.

    To help illustrate this, here is a screenshot of the good and bad Manifest file side-by-side: http://screencast.com/t/D6bbw7vR

    I have also inspected the APPX package and there are no duplicate files in there either. Here is a screenshot of it as well: http://screencast.com/t/Olsem1WYwEk2

    I also looked at the csproj files and they look like they should, no duplicate references.

    Isolating problem

    I have successfully eliminated that this is related to my app because I went and used this official Microsoft Example app and tired to publish it to a beta. Viola.. same 2001 Error. You can get that sample, build it and see the same problem I'm having.

    Solution?

    Can you please take a look at the package that example produces? This might be a bug with DevCenter or it might not. Either way, I am not able to publish my update until this is fixed :(


    Lance W. McCarthy Windows Phone Developer


    Friday, September 19, 2014 3:53 PM
  • Hi Lance,

    Please post your question in only one thread and please don't bump old threads with unrelated questions. I've merged these two for you, but you still have one on the Q and A thread for the sample.

    Since you're there and still posting, I assume that you've ensured that your component exports a valid function as Marcin Stankiewicz suggested.

    Please confirm that you've done so and still have the problem and we can look into this in more detail for you next week.

    --Rob

    Friday, September 19, 2014 11:58 PM
    Owner
  • Hi Rob,

    Thanks for merging these, I didn't realize the C++ one was a prerelease, I was looking for a reason why the C++ component is registering extra files in the manifest.

    In regards to the Q&A in the sample, I finally whittled it down to that specific component. I reached out to Marcin, but he's OOO until the end of the month, so I posted there.

    My components are exporting properly and run on the emulator in debug/release, but when switching to release-arm and deploying to phone I get the build error in the MDILXapCompileLog.txt file. I have no problem publishing the debug version for now, but get that error. Thank you for the follow-up. 


    Lance W. McCarthy Windows Phone Developer

    Saturday, September 20, 2014 12:36 AM
  • Hi Rob,

    I fixed it! Instead of making separate projects to manage my filters and shaders, I created a single Universal WinRT component with several ActivatibleClasses. That way I only have one namespace.

    So in my app's Package.appxmaniest, I only have one Extension with one InProcessServer pointing to the single DLL path. Then declare the different ActivatibleClasses pointing to the filter (which are not named with any suffixes).

    This resolved the Error 2001.If you still escalate this internally to find the root cause, please let me know what the final result was. If it happens again to me, I'd prefer not to have to rewrite my projects :)

    Thanks for the help.


    Lance W. McCarthy Windows Phone Developer

    Tuesday, September 23, 2014 10:10 PM