0

编辑:

在阅读了@Julian 在评论中提供的帖子中的答案后,我现在对这个问题进行了编辑。当我的应用程序检查更新并看到有更新要下载时,我该如何执行rundll32 %windir%\system32\dfshim.dll CleanOnlineAppCache(不知道这应该在更新下载之前还是之后完成)?

原帖:

我正在尝试对用户遇到的错误进行发布研究。

该应用程序是安装在用户计算机上的 wpf 应用程序。该应用程序的正常使用是他们单击桌面上的图标以检查更新,然后下载该应用程序的最新版本(如果存在)。

昨天我部署并且他们安装了它运行正确的应用程序。我做了一个小的表面文字编辑并发布了一个新版本。他们的桌面图标标识了一个新版本已发布并下载了新版本。

今天我正在开发应用程序,我所做的唯一重大更改NLogNLog.Config使用NuGet. 我在本地发布并且它有效。当我发布到 UAT 并让他们从桌面执行应用程序时,他们收到以下错误[Pasted Bellow To Keep this more readable]。我要求他们再试一次并得到同样的错误。要求他们跳过更新并得到同样的错误。

环顾互联网上的大多数人建议擦除安装并重试。所以我清除了他们的桌面图标和应用程序文件夹,AppData/...并尝试从发布的位置再次安装。有效。我做了另一个简单的编辑,应用程序看到了更新并安装了最新版本。

我不喜欢不知道为什么会发生错误,因为它会一次又一次地咬我。同样在 UAT 中,这也不是什么大问题,因为我可以把椅子推过去并进行卸载和重新安装,但是当它被部署时,我就没有那么奢侈了,即使跳过更新仍然会破坏应用程序,我会失去一个应用程序中有很多“信任”。

总而言之,是添加NLog到应用程序中导致错误的原因,如果是,我应该如何添加NLog到我的应用程序中?我也会接受“不,NLog 不是问题。去别处寻找错误的来源。”

奖励:将来这种情况会再次发生,但这次是针对我的一般用户群。你会怎么做才能从中恢复过来?注意:在用户计算机中访问/远程处理不是一个选项。

PLATFORM VERSION INFO
    Windows             : 6.1.7601.65536 (Win32NT)
    Common Language Runtime     : 4.0.30319.42000
    System.Deployment.dll       : 4.8.3761.0 built by: NET48REL1
    clr.dll             : 4.8.3928.0 built by: NET48REL1
    dfdll.dll           : 4.8.3761.0 built by: NET48REL1
    dfshim.dll          : 4.0.41209.0 (Main.041209-0000)

SOURCES
    Deployment url          : file:///C:/Users/[path]/Tenant%20Analytics%20Tool%20-%201%20.appref-ms%7C
    Deployment Provider url     : file://catdtfnp02/Data$/Data_TDT/[another_path]/Tenant%20Tool%20Analytics%20Module.application
    Application url         : file://catdtfnp02/Data$/Data_TDT/[another_path]/Application%20Files/Tenant%20Tool%20Analytics%20Module_1_0_0_65/Tenant%20Tool%20Analytics%20Module.exe.manifest

IDENTITIES
    Application Identity        : Tenant Tool Analytics Module.exe, Version=1.0.0.65, Culture=neutral, PublicKeyToken=c48350b63a3c5924, processorArchitecture=x86, type=win32

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of C:\Users\[user name]\Desktop\Tenant Analytics Tool - 1 .appref-ms| resulted in exception. Following failure messages were detected:
        + Value does not fall within the expected range.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    * [11/12/2019 3:48:58 PM] : Activation of C:\Users\[user name]\Desktop\Tenant Analytics Tool - 1 .appref-ms| has started.
    * [11/12/2019 3:48:58 PM] : Performing necessary update check as specified by the deployment.
    * [11/12/2019 3:48:58 PM] : Consuming new update.
    * [11/12/2019 3:49:05 PM] : Installation of the application has started.
    * [11/12/2019 3:49:05 PM] : Processing of application manifest has successfully completed.
    * [11/12/2019 3:49:05 PM] : Found compatible runtime version 4.0.30319.
    * [11/12/2019 3:49:05 PM] : Request of trust and detection of platform is complete.

ERROR DETAILS
    Following errors were detected during this operation.
    * [11/12/2019 3:49:05 PM] System.ArgumentException
        - Value does not fall within the expected range.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Internal.Isolation.IStore.LockApplicationPath(UInt32 Flags, IDefinitionAppId ApId, IntPtr& Cookie)
            at System.Deployment.Application.ComponentStore.LockApplicationPath(DefinitionAppId definitionAppId)
            at System.Deployment.Application.SubscriptionStore.LockApplicationPath(DefinitionAppId definitionAppId)
            at System.Deployment.Application.FileDownloader.PatchFiles(SubscriptionState subState)
            at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState, X509Certificate2 clientCertificate)
            at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
            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.ConsumeUpdatedDeployment(SubscriptionState& subState, ActivationDescription actDesc)
            at System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState& subState, String& errorPageUrl)
            at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile)
            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)

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.
4

0 回答 0