none
How do i use PackageDependency?

    Dotaz

  • Can someone explain a few things about using <PackageDependency> in the appxmanifest for me?

    1. What types of dependencies are allowed?  C++ Dynamic Library DLLs?  Do they need to be "Metro Style" to work?  Or do they have to be WinRT Components?
    2. What is the Name attribute of PackageDependency?  Is it an assembly namespace?  A file name?  With or without extensions?
    3. What is the schema of the Name attribute of PackageDependency? Underscores seem to not be allowed.
    4. How does a C# "Any CPU" app package deal with PackageDependency when there are x64, x86, and ARM versions of the C++ DLL?
    5. How do a add my DLL dependency to my csproj?  A "copy if newer" Content file?  Or do I need to add it at all?

    There is very little information out there on this and no examples of it in use.  Thanks for anything you can tell me!


    7. dubna 2012 9:11

Odpovědi

  • PackageDependencies refer to other app packages that the current package depends on. Good examples are Microsoft.WinJS and Microsoft.VCLibs packages. This isn't used for other assemblies included within your own app package. It is used to refer to other packages pre-installed on the system.

    If you build a deployment package for a C++ or JavaScript app and look at the AppxManifest.xml you should find a PackageDependency for WinJS or VCLibs. C# apps don't typically need them.

    The name is the name of the dependent package. An "Any CPU" package dependency will look for the appropriate CPU version: the full package identity includes the processor architecture.

    --Rob

    • Označen jako odpověď Tom Spilman 11. dubna 2012 1:10
    11. dubna 2012 0:40
    Vlastník

Všechny reakce

  • PackageDependencies refer to other app packages that the current package depends on. Good examples are Microsoft.WinJS and Microsoft.VCLibs packages. This isn't used for other assemblies included within your own app package. It is used to refer to other packages pre-installed on the system.

    If you build a deployment package for a C++ or JavaScript app and look at the AppxManifest.xml you should find a PackageDependency for WinJS or VCLibs. C# apps don't typically need them.

    The name is the name of the dependent package. An "Any CPU" package dependency will look for the appropriate CPU version: the full package identity includes the processor architecture.

    --Rob

    • Označen jako odpověď Tom Spilman 11. dubna 2012 1:10
    11. dubna 2012 0:40
    Vlastník
  • Thanks Rob.

    From the docs in LoadPackagedLibrary it is not clear that PackageDependency is not required for loading a regular DLL that is already packaged in your app as "Content".

    11. dubna 2012 1:10