New article
Recently updated
Ideagen Internal Audit (Aura) App Manager: NullReferenceException error when updating ClickOnce client with custom DLL
Scenario
Customer has a working system, with an existing custom business rules DLL. This DLL is located at E:\CustomerFiles\PRD\vx.0.x.0\BusinessRules\, and is deployed via App Manager.
When deploying a new build of the DLL to the existing instance (via Upgrade in App Manager), the following happens:
- App Manager crashes, with this error:
-
Exception of type: TngException[General] - Message: Error running background task
System.Object:
at Pentana.Tng.AppManager.AsyncHelper.<>c__DisplayClass1_2.<RunAsync>b__3()
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
1.1. Exception of type: NullReferenceException - Message: Object reference not set to an instance of an object.
at Pentana.Tng.AppManager.Common.Helpers.CopyCustomerFiles(DirectoryInfo target, DirectoryInfo newFiles, String subDirName)
at Pentana.Tng.AppManager.Common.Helpers.CopyNewFiles(DirectoryInfo target, DirectoryInfo newFiles, String subDirName, Boolean isClickOnce)
at Pentana.Tng.AppManager.Plugins.ClickOnce.CopyNewClickOnceFiles()
at Pentana.Tng.AppManager.Plugins.ClickOnce.Update()
at Pentana.Tng.AppManager.Plugins.ClientViewModel.DoClickOnceUpgrade()
at Pentana.Tng.AppManager.Plugins.ClientViewModel.<UpgradeExecute>b__27_0()
at Pentana.Tng.AppManager.AsyncHelper.<>c__DisplayClass1_0.<RunAsync>b__0(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
The error appears where the following successful operation would normally be expected:
2021-09-18 08:55:33.034 24-Feb-2021 08:55:33.032 (Config) Cert Found
- The folder AppManager\Upgrade\Upgrade_vx.0.x_vx.0.x may contain an incomplete set of files/folders
Workaround
The workaround is to:
- Extract a fresh copy of the installation file set from the downloaded zip file
- Run the newly-extracted App Manager
- Update the App Manager Instance file with the new path
- Attempt the upgrade again