i want to create a PSA (Print Support Application) using dotnet 9.0.300 and Windows 11 SDK. I'm using VS Professional 17.14.2. OS is Windows 11 Pro Version 10.0.26100.
The deploy results in the following error:
DEP0700: Registration of the app failed. [0x80073CF6] Error 0x80080204: The package "617e6418-6847-4fa1-bec6-3a3668d09f6d_1.0.0.0_x86__g0j7nbxh9a4mw" cannot be registered due to the following error: The appx package manifest is invalid.
I need help for understanding this issue, because i have no more information about the problem. Hopy you folks can help. THX
I have a simple blank UWP application project with the following Package.appxmanifest
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap11="http://schemas.microsoft.com/appx/manifest/uap/windows10/11"
xmlns:printsupport="http://schemas.microsoft.com/appx/manifest/printsupport/windows10"
xmlns:printsupport2="http://schemas.microsoft.com/appx/manifest/printsupport/windows10/2"
IgnorableNamespaces="uap mp printsupport printsupport2 uap11">
<Identity
Name="617e6418-6847-4fa1-bec6-3a3668d09f6d"
Publisher="CN=patrick"
Version="1.0.0.0" />
<mp:PhoneIdentity
PhoneProductId="617e6418-6847-4fa1-bec6-3a3668d09f6d"
PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>PrintingApp</DisplayName>
<PublisherDisplayName>patrick</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal"
MinVersion="10.0.22000.0" MaxVersionTested="10.0.22621.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application
Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="PrintingApp.App">
<uap:VisualElements
DisplayName="PrintingApp"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="PrintingApp"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" />
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<!--1. Virtueller Drucker-Workflow-->
<printsupport2:Extension
Category="windows.printSupportVirtualPrinterWorkflow"
EntryPoint="PrintingApp.Tasks.PrintSupportWorkflowBackgroundTask"
uap11:SupportsMultipleInstances="true">
<printsupport2:PrintSupportVirtualPrinter
DisplayName="ms-resource://PRINTER_NAME1"
PrinterUri="contoso-psa:printer1"
PreferredInputFormat="application/postscript"
OutputFileTypes="ps;pdf"
PdcFile="Config\PRINTER_PDC1.xml">
<printsupport2:SupportedFormats>
<printsupport2:SupportedFormat Type="application/postscript" />
<printsupport2:SupportedFormat Type="application/pdf" MaxVersion="1.7" />
</printsupport2:SupportedFormats>
</printsupport2:PrintSupportVirtualPrinter>
</printsupport2:Extension>
<!--2. Print-Support-Extension-->
<printsupport:Extension
Category="windows.printSupportExtension"
EntryPoint="PrintingApp.Tasks.PrintSupportExtensionBackgroundTask"
uap11:SupportsMultipleInstances="true" />
<!--3. Print-Support-SettingsUI-->
<printsupport:Extension
Category="windows.printSupportSettingsUI"
EntryPoint="PrintingApp.Tasks.PrintSupportSettingsUIBackgroundTask"
uap11:SupportsMultipleInstances="true" />
<!--4. Print-Support-JobUI-->
<printsupport:Extension
Category="windows.printSupportJobUI"
EntryPoint="PrintingApp.Tasks.PrintSupportJobUIBackgroundTask"
uap11:SupportsMultipleInstances="true" />
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
The Entry Point classes are within the defined namespace and declared as public sealed partial class, e.g.
using Windows.ApplicationModel.Background;
using Windows.Graphics.Printing.PrintSupport;
namespace PrintingApp.Tasks
{
/// <summary>
/// Background-Task für PrintTicket-Validierung und -Erweiterungen.
/// </summary>
public sealed partial class PrintSupportExtensionBackgroundTask : IBackgroundTask
{
public void Run(IBackgroundTaskInstance taskInstance)
{
var deferral = taskInstance.GetDeferral();
deferral.Complete();
}
}
}
Note that the PRINTER_PDC1 is of type content and copied always with this "dummy" content:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Beispiel einer PDC (Print Device Capabilities) für einen virtuellen Drucker (PSA).
Namespace psk steht hier für das PrintSchemaKernel (siehe Schema-Definitionen).
-->
<psk:PrintDeviceCapabilities
xmlns:psk="http://schemas.microsoft.com/windows/2003/08/printing/printschemakernel"
psk:Version="1.0">
<!-- Feature: PageMediaSize (Papierformat) -->
<psk:Feature psk:Name="PageMediaSize">
<psk:Option psk:Name="ISOA4">
<psk:DisplayName xml:lang="en">A4</psk:DisplayName>
</psk:Option>
<psk:Option psk:Name="ISOB5">
<psk:DisplayName xml:lang="en">B5</psk:DisplayName>
</psk:Option>
<psk:Option psk:Name="Letter">
<psk:DisplayName xml:lang="en">Letter</psk:DisplayName>
</psk:Option>
</psk:Feature>
<!-- Feature: PageOrientation (Ausrichtung) -->
<psk:Feature psk:Name="PageOrientation">
<psk:Option psk:Name="Portrait">
<psk:DisplayName xml:lang="en">Hochformat</psk:DisplayName>
</psk:Option>
<psk:Option psk:Name="Landscape">
<psk:DisplayName xml:lang="en">Querformat</psk:DisplayName>
</psk:Option>
</psk:Feature>
<!-- Feature: PageOutputColor (Farbausgabe) -->
<psk:Feature psk:Name="PageOutputColor">
<psk:Option psk:Name="Color">
<psk:DisplayName xml:lang="en">Farbe</psk:DisplayName>
</psk:Option>
<psk:Option psk:Name="Monochrome">
<psk:DisplayName xml:lang="en">Schwarzweiß</psk:DisplayName>
</psk:Option>
</psk:Feature>
<!-- Feature: Duplex (Beidseitig drucken) -->
<psk:Feature psk:Name="Duplex">
<psk:Option psk:Name="OneSided">
<psk:DisplayName xml:lang="en">Einseitig</psk:DisplayName>
</psk:Option>
<psk:Option psk:Name="TwoSidedLongEdge">
<psk:DisplayName xml:lang="en">Beidseitig (lange Kante)</psk:DisplayName>
</psk:Option>
<psk:Option psk:Name="TwoSidedShortEdge">
<psk:DisplayName xml:lang="en">Beidseitig (kurze Kante)</psk:DisplayName>
</psk:Option>
</psk:Feature>
<!-- Feature: Copies (Anzahl Kopien) -->
<psk:Feature psk:Name="Copies">
<psk:Option psk:Name="CopiesSupported"/>
</psk:Feature>
</psk:PrintDeviceCapabilities>