locked
Package Dependency AppXManifest Issue

    Question

  • I'm trying to create a Framework package that I can integrate and run in other Metro C++ apps, but I'm running into an issue when writing the AppXManifest.xml, which currently looks like this:

    <?xml version="1.0" encoding="utf-8"?>
    <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest">
      <Identity Name="PackageTest1" 
                Version="6.2.0.0" 
                Publisher="___"/>
      <Properties>
        <DisplayName>PackageTest1</DisplayName>
        <PublisherDisplayName>Me</PublisherDisplayName>
        <Logo>Logo.png</Logo>
        <Framework>true</Framework>
      </Properties>
      <Prerequisites>
        <OSMinVersion>6.2.0</OSMinVersion>
        <OSMaxVersionTested>6.2.0</OSMaxVersionTested>
      </Prerequisites>
      <Resources>
        <Resource Language="en-us" />
      </Resources>
    </Package>

    For some reason I'm seeing this error;

    error APPX1605: At least one Application element must be defined in the app manifest.c:\Users\___\documents\visual studio 2012\Projects\PackageTest1\PackageTest1\AppXManifest.xml

    I'm confused because the documentation here says a framework package cannot define an 'Application' node. Any ideas?

    Edit: I'm currently on 8400 x64 with VS 11.0.50522.1 RCREL
    • Edited by inspira Monday, June 4, 2012 10:48 PM
    Monday, June 4, 2012 10:33 PM

Answers

  • Like David said, you will need to include the component separately with each app.

    There is no means provided for shared custom components.

    PackageDependency is used for dependencies on system packages (like VCLibs and WinJS, which are already included on the system). You cannot create a custom framework package to include PackageDependency.

    --Rob

    • Marked as answer by inspira Tuesday, June 12, 2012 11:20 PM
    Wednesday, June 6, 2012 1:05 AM
    Owner

All replies

  • Could you elaborate on what you envisioned doing with a Framework package? Is it for your personal use or were you planning to share it with others in some fashion?

    Thanks!


    David Lamb

    Monday, June 4, 2012 11:45 PM
    Moderator
  • I have some common functionality for the Charm bar that I want any Metro app to be able to use (not just for personal use). If I understand how app packaging works correctly, I want to package this code as a separate Framework package AppX, which my other apps will be able to use via manifest PackageDependency.

    I've been following this for making the Framework package, and this for using the package, but I'm having the issue I posted above. Is my syntax correct, or am I missing something?


    • Edited by inspira Monday, June 4, 2012 11:54 PM
    Monday, June 4, 2012 11:53 PM
  • As 3rd party framework packages will not be allowed in the Store, I'm not sure any other scenario usage guidance or documentation has been released as yet. I'm checking...

    David Lamb

    Tuesday, June 5, 2012 1:12 AM
    Moderator
  • In that case, is there an approach I can take to achieve that effect? My goal is to reduce the amount of code I need to bundle with each app. Ideally I'd like a way to abstract away all common functionality into a separate component (i.e. with search/share functionality via Charm Bar), that way every subsequent App I write can call this separate component.
    Tuesday, June 5, 2012 1:38 AM
  • In your case, it sounds as if you would want to build a Windows Runtime Component project for your shared code. Each Appx package uploaded to the store would need to have its own copy of the component. The benefit is each Metro style app will be completely functional and unaffected by an addition or removal of any other package.

    David Lamb

    Tuesday, June 5, 2012 6:16 PM
    Moderator
  • So to clarify, there is no way for me to write a Metro style app with the functionality I want to share (i.e. search/share), and to specify this app as a dependency for all other apps I write? I'm a little confused because it seems like the <PackageDependency> tags in the manifest were made for this.

    Edit: Also, I'm looking to be able to change the shared component without having to update each and every single App I write that uses that component.

    • Edited by inspira Tuesday, June 5, 2012 6:39 PM
    Tuesday, June 5, 2012 6:24 PM
  • Sorry for the bump, this is very critical for me. Any help would be greatly appreciated.
    Wednesday, June 6, 2012 12:51 AM
  • Like David said, you will need to include the component separately with each app.

    There is no means provided for shared custom components.

    PackageDependency is used for dependencies on system packages (like VCLibs and WinJS, which are already included on the system). You cannot create a custom framework package to include PackageDependency.

    --Rob

    • Marked as answer by inspira Tuesday, June 12, 2012 11:20 PM
    Wednesday, June 6, 2012 1:05 AM
    Owner
  • The “Framework field” in Package Identity is reserved for Windows Component Libraries such as WinJS, CRT, PlayReady DRM. For any dependencies/libraries that you have or are building, you will need to include the DLLs, WinRT objects, code within the package for your app.

    You can only submit an app Appx package to the Store.

    I really appreciate your feedback on the servicing scenario and will make certain that request is noted.


    David Lamb

    Wednesday, June 6, 2012 1:11 AM
    Moderator