不能 运行 "published" ClickOnce-Application:有缺陷的清单

Cant run "published" ClickOnce-Application: Flawed manifest

我已经使用了几天的 ClickOnce 功能,但没有出现任何问题。但是从昨天开始,无论哪种设置,调试或启动应用程序时都会出现一条错误消息,并选中“sign ClickOnce-manifests”:

"由于清单文件有缺陷,此应用程序无法启动。"

应用程序日志显示:

INFO ZUR PLATTFORMVERSION
    Windows             : 10.0.19041.0 (Win32NT)
    Common Language Runtime     : 4.0.30319.42000
    System.Deployment.dll       : 4.8.4240.0 built by: NET48REL1LAST_B
    clr.dll             : 4.8.4220.0 built by: NET48REL1LAST_C
    dfdll.dll           : 4.8.4240.0 built by: NET48REL1LAST_B
    dfshim.dll          : 10.0.19041.1 (WinBuild.160101.0800)

QUELLEN
    Bereitstellungs-URL         : file:///C:/Users/malik/AppData/Roaming/Microsoft/Windows/Start%20Menu/Programs/MysteryMaker/MysteryMaker.appref-ms%7C
                        Server      : nginx
                        X-Powered-By    : PleskLin

FEHLERZUSAMMENFASSUNG
    Es folgt eine Zusammenfassung der Fehler. Details zu diesen Fehlern werden später im Protokoll aufgelistet.
    * Die Aktivierung von C:\Users\malik\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MysteryMaker\MysteryMaker.appref-ms| führte zu einer Ausnahme. Folgende Fehlermeldungen wurden entdeckt:
        + Ausnahme beim Lesen des Manifests aus 'https://mysterymaker.zap106456-1.plesk05.zap-webspace.com/Application%20Files/MysteryMaker_1_0_0_27/MysteryMaker.exe.manifest': Das Manifest ist möglicherweise ungültig, oder die Datei konnte nicht geöffnet werden.
        + Das Anwendungsmanifest ist semantisch ungültig.
        + Das Dateielement 'lib\fedora-x64\native\..\libgit2-106a5f2.so' muss einen relativen Pfad aufweisen.

FEHLERZUSAMMENFASSUNG FÜR DIE SPEICHERTRANSAKTION DER KOMPONENTE
    Es wurde kein Transaktionsfehler festgestellt.

WARNUNGEN
    Während dieses Vorgangs gab es keine Warnungen.

FORTSCHRITTSSTATUS DES VORGANGS
    * [10.10.2020 10:40:03] : Die Aktivierung von C:\Users\malik\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\MysteryMaker\MysteryMaker.appref-ms| wurde gestartet.
    * [10.10.2020 10:40:03] : Erforderliche Überprüfung auf Updates wird so ausgeführt, wie dies durch die Bereitstellung angegeben ist.
    * [10.10.2020 10:40:04] : Neue Aktualisierung wird verwendet
    * [10.10.2020 10:40:05] : Die Installation der Anwendung wurde gestartet.

FEHLERDETAILS
    Folgende Fehler wurden bei diesem Vorgang entdeckt.
    * [10.10.2020 10:40:06] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
        - Ausnahme beim Lesen des Manifests aus 'https://mysterymaker.zap106456-1.plesk05.zap-webspace.com/Application%20Files/MysteryMaker_1_0_0_27/MysteryMaker.exe.manifest': Das Manifest ist möglicherweise ungültig, oder die Datei konnte nicht geöffnet werden.
        - Quelle: System.Deployment
        - Stapelüberwachung:
            bei System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
            bei System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
            bei System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
            bei System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
            bei System.Deployment.Application.ApplicationActivator.ConsumeUpdatedDeployment(SubscriptionState& subState, ActivationDescription actDesc)
            bei System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState& subState, String& errorPageUrl)
            bei System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile)
            bei System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri)
            bei System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
--- Ende der Stapelüberwachung vom vorhergehenden Ort, an dem die Ausnahme ausgelöst wurde ---
            bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
            bei System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
            bei System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
        --- Interne Ausnahme ---
        System.Deployment.Application.InvalidDeploymentException (ManifestSemanticValidation)
        - Das Anwendungsmanifest ist semantisch ungültig.
        - Quelle: System.Deployment
        - Stapelüberwachung:
            bei System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForApplicationRole()
            bei System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
        --- Interne Ausnahme ---
        System.Deployment.Application.InvalidDeploymentException (ManifestComponentSemanticValidation)
        - Das Dateielement 'lib\fedora-x64\native\..\libgit2-106a5f2.so' muss einen relativen Pfad aufweisen.
        - Quelle: System.Deployment
        - Stapelüberwachung:
            bei System.Deployment.Application.Manifest.AssemblyManifest.ValidateFile(File f)
            bei System.Deployment.Application.Manifest.AssemblyManifest.ValidateSemanticsForApplicationRole()

DETAILS ZUR SPEICHERTRANSAKTION DER KOMPONENTE
    Es sind keine Transaktionsinformationen verfügbar.

“有缺陷的”manifest 文件由 VS2019 自动生成,删除它会再次创建相同的文件:

<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <!-- UAC-Manifestoptionen
             Wenn Sie die Ebene der Benutzerkontensteuerung für Windows ändern möchten, ersetzen Sie den 
             Knoten "requestedExecutionLevel" wie folgt.

        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />

            Durch Angabe des Elements "requestedExecutionLevel" wird die Datei- und Registrierungsvirtualisierung deaktiviert. 
            Entfernen Sie dieses Element, wenn diese Virtualisierung aus Gründen der Abwärtskompatibilität
            für die Anwendung erforderlich ist.
        -->
        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
      </requestedPrivileges>
      <applicationRequestMinimum>
        <defaultAssemblyRequest permissionSetReference="Custom" />
        <PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" Unrestricted="true" />
      </applicationRequestMinimum>
    </security>
  </trustInfo>
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!-- Eine Liste der Windows-Versionen, unter denen diese Anwendung getestet
           und für die sie entwickelt wurde. Wenn Sie die Auskommentierung der entsprechenden Elemente aufheben,
           wird von Windows automatisch die kompatibelste Umgebung ausgewählt. -->
      <!-- Windows Vista -->
      <!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
      <!-- Windows 7 -->
      <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
      <!-- Windows 8 -->
      <!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
      <!-- Windows 8.1 -->
      <!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
      <!-- Windows 10 -->
      <!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
    </application>
  </compatibility>
  <!-- Gibt an, dass die Anwendung mit DPI-Werten kompatibel ist und von Windows nicht automatisch auf höhere
       DPI-Werte skaliert wird. WPF-Anwendungen (Windows Presentation Foundation) sind automatisch mit DPI-Werten kompatibel und müssen sich nicht  
       anmelden. Für Windows Forms-Anwendungen für .NET Framework 4.6, die sich für diese Einstellung anmelden, muss 
       auch die Einstellung "'EnableWindowsFormsHighDpiAutoResizing" in der "app.config" auf "true" festgelegt werden. -->
  <!--
  <application xmlns="urn:schemas-microsoft-com:asm.v3">
    <windowsSettings>
      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
    </windowsSettings>
  </application>
  -->
  <!-- Designs für allgemeine Windows-Steuerelemente und -Dialogfelder (Windows XP und höher) aktivieren -->
  <!--
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
          type="win32"
          name="Microsoft.Windows.Common-Controls"
          version="6.0.0.0"
          processorArchitecture="*"
          publicKeyToken="6595b64144ccf1df"
          language="*"
        />
    </dependentAssembly>
  </dependency>
  -->
</assembly>

我也试过创建一个“测试证书”,但没有用。

感谢您的支持。

“libgit2”是我安装的一个似乎有缺陷的包。我刚刚卸载了它,它工作得很好! :D