EDIT:
After reading an answer in the post provided by @Julian in the comments, I now have an edit to this question. How do I execute rundll32 %windir%\system32\dfshim.dll CleanOnlineAppCache
when my application checks for an update and sees that there is an update to download (Don't know if this should be done before or after update downloads)?
ORIGINAL POST:
I'm trying to do post research on a bug that a user experienced.
The application is a wpf application that gets installed on the users computer. Normal use of the application is that they click an icon on their desktop which checks for updates and then downloads the newest version of the application if it exists.
Yesterday I deployed and they installed the application it ran correctly. I did a small superficial text edit and published a new version. They're desktop icon identified that a new version was published and downloaded the new version.
Today I was working on the app and the only major change I did was adding and implementing NLog
and NLog.Config
to the application using NuGet
. I published locally and it worked. When I published to UAT and got them to execute the app from their desktop they got the following error [Pasted Bellow To Keep this more readable]
. I asked them to try again and got the same error. Asked them to skip the update and got the same error.
Looking around most people on the internet suggested wiping the install and trying again. So I cleared their desktop icon and the apps folder in AppData/...
and tried installing again from the published location. It worked. I did another trivial edit and the application saw the update and installed the newest version.
I don't like not knowing why a bug happens because it will come to bite me again and again. Also in UAT this is not so much an issue since I can wheel my chair over and do an uninstall and reinstall but when this gets deployed I won't have that luxury and if even skipping the update still breaks the application I'll loose a lot of "trust" in the application.
To summarize, was adding NLog
to the application what caused the bug and if so how should have I gone about adding NLog
to my application? I'll also accept "No, NLog wasn't the issue. Go look elsewhere for the source of the bug."
Bonus: In the future this has happened again but this time to my general user base. What would you do to recover from this? Note: Accessing/Remoting In a users computer is not an option.
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.