ClickOnce: the manifest may not be valid or the file could not be opened DPI Aware

139 Views Asked by At

I change my WPF application to be DPI awarness and when I update the version with clickonce I have the following message:

PLATFORM VERSION INFO Windows : 10.0.14393.0 (Win32NT) Common Language Runtime : 4.0.30319.42000 System.Deployment.dll : 4.8.4290.0 built by: NET48REL1LAST_B clr.dll : 4.8.4645.0 built by: NET48REL1LAST_B dfdll.dll : 4.8.4290.0 built by: NET48REL1LAST_B dfshim.dll : 10.0.14393.5356 (rs1_release.220906-1211)

SOURCES Deployment url : file:///D:/INSTALL/UPDATE/TDS.application

IDENTITIES Deployment Identity : TDS.application, Version=1.3.0.9, Culture=neutral, PublicKeyToken=2a2301fd7e94271f, processorArchitecture=msil

APPLICATION SUMMARY * Installable application.

ERROR SUMMARY Below is a summary of the errors, details of these errors are listed later in the log. * Activation of D:\INSTALL\UPDATE\TDS.application resulted in exception. Following failure messages were detected: + Exception reading manifest from file:///D:/INSTALL/UPDATE/Application%20Files/TDS_1_3_0_9/TDS.dll.manifest: the manifest may not be valid or the file could not be opened. + Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed: -HRESULT: 0x8007001f Start line: 0 Start column: 0 Host file:
+ A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F)

COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was detected.

WARNINGS There were no warnings during this operation.

OPERATION PROGRESS STATUS * [9/14/2023 7:54:52 PM] : Activation of D:\INSTALL\UPDATE\TDS.application has started. * [9/14/2023 7:54:53 PM] : Processing of deployment manifest has successfully completed. * [9/14/2023 7:54:53 PM] : Installation of the application has started.

ERROR DETAILS Following errors were detected during this operation. * [9/14/2023 7:54:53 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse) - Exception reading manifest from file:///D:/INSTALL/UPDATE/Application%20Files/TDS_1_3_0_9/TDS.dll.manifest: the manifest may not be valid or the file could not be opened. - Source: System.Deployment - Stack trace: at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri) at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath) at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp) at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl, Uri& deploymentUri) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivationWithRetry(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state) --- Inner Exception --- System.Deployment.Application.InvalidDeploymentException (ManifestParse) - Parsing and DOM creation of the manifest resulted in error. Following parsing errors were noticed: -HRESULT: 0x8007001f Start line: 0 Start column: 0 Host file:
- Source: System.Deployment - Stack trace: at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream) at System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream) at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri) --- Inner Exception --- System.Runtime.InteropServices.COMException - A device attached to the system is not functioning. (Exception from HRESULT: 0x8007001F) - Source: System.Deployment - Stack trace: at System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid) at System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream)

COMPONENT STORE TRANSACTION DETAILS No transaction information is available.

Maybe is for the version of the windows (Windows Server 2016): enter image description here

And this is my manifest field (I try to comment the line of dpiAware and the others but it did not work.

<?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">
        <!-- Opciones del manifiesto UAC
             Si quiere cambiar el nivel del Control de cuentas de usuario de Windows reemplace el 
             nodo requestedExecutionLevel por uno de los siguientes.

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

            Especificar el elemento requestedExecutionLevel deshabilitará la virtualización de archivos y registros. 
            Quite este elemento si la aplicación necesita esta virtualización para la compatibilidad
            con versiones anteriores.
        -->
        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>

  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!-- Una lista de las versiones de Windows en la que se ha probado esta aplicación y
           con la que se ha diseñado para que trabaje. Quite la marca de comentario de los elementos adecuados y Windows seleccionará 
           automáticamente el entorno más compatible. -->

      <!-- 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>

  <!-- Indica que la aplicación tiene reconocimiento de PPP y Windows no la escalará de forma automática a
       PPP superiores. Las aplicaciones de Windows Presentation Foundation (WPF) tienen reconocimiento de PPP automático y no necesitan 
       participar. Las aplicaciones de Windows Forms destinadas a .NET Framework 4.6 que participan en esta configuración, también 
       deben establecer la configuración "EnableWindowsFormsHighDpiAutoResizing" en "true" en app.config. 
       
       Hace que la aplicación sea compatible con rutas de acceso largas. Consulte https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
  
  <application xmlns="urn:schemas-microsoft-com:asm.v3">
    <windowsSettings>
      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
        <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitor</dpiAwareness>
        <!--<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2,PerMonitor</dpiAwareness>-->
        <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
    </windowsSettings>
  </application>

  <!-- Habilitar los temas para los controles y cuadros de diálogo comunes de Windows (Windows XP y versiones posteriores) -->
  <!--
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
          type="win32"
          name="Microsoft.Windows.Common-Controls"
          version="6.0.0.0"
          processorArchitecture="*"
          publicKeyToken="6595b64144ccf1df"
          language="*"
        />
    </dependentAssembly>
  </dependency>
  -->

</assembly>
0

There are 0 best solutions below