windowscitrix

why does my citrix workspace app keep freezing with this error "Could not load file or assembly 'System.Management, Version=8.0.0.0'"


When I start Citrix Workspace to connect to an Azure VDI it works for about 30 minutes and then everything locks up. Also it mentions version 4.0.0.0 in the logs. If I collect logs here are the key errors I see in DiagnosticTool.log:

09:35:45.8382601|VERB|ExportEventLogFile|Begin exporting Application file
09:35:45.8436743|ERRO|Collect|Could not load file or assembly 'System.Management, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
EXCEPTION: System.IO.FileNotFoundException
   at Rem.DiagReportPage.DiagReportModel.EventLogCollectionTask.GetWMIObjectsInOneCsvFile(String dirPath, String csvFile, String strScope, String strSearch)
   at Rem.DiagReportPage.DiagReportModel.EventLogCollectionTask.GetSystemEventLogInOneCsvFile(String theTempFolder, String theCSVFileName, DateTime theFromDate)
   at Rem.DiagReportPage.DiagReportModel.SystemLogCollectionTask.Collect(String theTempFolder)
09:35:45.8437298|ERRO|Collect|Could not find a part of the path 'C:\Users\myuser\AppData\Local\Temp\DiagnosticTool\kbzntur2.mnm\DiagnosticTool_20240619_153545884\System\SystemInfo.csv'.
EXCEPTION: System.IO.DirectoryNotFoundException
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   at System.IO.StreamWriter..ctor(String path)
   at Rem.DiagReportPage.DiagReportModel.SystemInfoCollectionTask.Collect(String theTempFolder)
09:35:45.8877336|WARN|ProcessRegistryKey|HKEY_LOCAL_MACHINE Missing Registry key SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains
...
1.08:34:24.6533823|ERRO|AddDirectory|An item with the same key has already been added. Key: InstallLogs/CTXWorkspaceInstallLogs-20240619-172405/AppProtection-2024619-11245.log
EXCEPTION: System.ArgumentException
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at Ionic.Zip.ZipFile._InternalAddEntry(ZipEntry ze)
   at Ionic.Zip.ZipFile.AddFile(String fileName, String directoryPathInArchive)
   at Ionic.Zip.ZipFile.AddOrUpdateDirectoryImpl(String directoryName, String rootDirectoryPathInArchive, AddOrUpdateAction action, Boolean recurse, Int32 level)
   at Ionic.Zip.ZipFile.AddOrUpdateDirectoryImpl(String directoryName, String rootDirectoryPathInArchive, AddOrUpdateAction action)
   at Ionic.Zip.ZipFile.AddDirectory(String directoryName, String directoryPathInArchive)
   at CtxUtility.Zip.ZipLib.AddDirectory(String dirPath, String directoryPathInArchive)
1.08:34:24.6533942|INFO|Archive|Adding folder C:\Program Files (x86)\Citrix\Logs\CTXWorkspaceInstallLogs-20240619-164929 
1.08:34:24.7645109|INFO|Archive|Adding folder C:\Program Files (x86)\Citrix\Logs\CTXWorkspaceInstallLogs-20240619-164929 
1.08:34:24.7649578|ERRO|AddDirectory|An item with the same key has already been added. Key: InstallLogs/CTXWorkspaceInstallLogs-20240619-164929/CWAInstaller-20240619-164929.log
EXCEPTION: System.ArgumentException
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at Ionic.Zip.ZipFile._InternalAddEntry(ZipEntry ze)
   at Ionic.Zip.ZipFile.AddFile(String fileName, String directoryPathInArchive)
   at Ionic.Zip.ZipFile.AddOrUpdateDirectoryImpl(String directoryName, String rootDirectoryPathInArchive, AddOrUpdateAction action, Boolean recurse, Int32 level)
   at Ionic.Zip.ZipFile.AddOrUpdateDirectoryImpl(String directoryName, String rootDirectoryPathInArchive, AddOrUpdateAction action)
   at Ionic.Zip.ZipFile.AddDirectory(String directoryName, String directoryPathInArchive)
   at CtxUtility.Zip.ZipLib.AddDirectory(String dirPath, String directoryPathInArchive)
1.08:34:24.7649650|INFO|Archive|Adding folder C:\Program Files (x86)\Citrix\Logs\CTXWorkspaceInstallLogs-20240619-155610 
1.08:34:24.8832338|INFO|Archive|Adding folder C:\Program Files (x86)\Citrix\Logs\CTXWorkspaceInstallLogs-20240619-155610 
1.08:34:24.8836582|ERRO|AddDirectory|An item with the same key has already been added. Key: InstallLogs/CTXWorkspaceInstallLogs-20240619-155610/AppProtection-2024619-95610.log
EXCEPTION: System.ArgumentException
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at Ionic.Zip.ZipFile._InternalAddEntry(ZipEntry ze)
   at Ionic.Zip.ZipFile.AddFile(String fileName, String directoryPathInArchive)
   at Ionic.Zip.ZipFile.AddOrUpdateDirectoryImpl(String directoryName, String rootDirectoryPathInArchive, AddOrUpdateAction action, Boolean recurse, Int32 level)
   at Ionic.Zip.ZipFile.AddOrUpdateDirectoryImpl(String directoryName, String rootDirectoryPathInArchive, AddOrUpdateAction action)
   at Ionic.Zip.ZipFile.AddDirectory(String directoryName, String directoryPathInArchive)
   at CtxUtility.Zip.ZipLib.AddDirectory(String dirPath, String directoryPathInArchive)

Here is the full log: https://pastebin.com/ZY28hSGj

Here are websites I have checked and tried different suggestions but still no success. Also, I have tried uninstalling and re-installing Citrix Workspace, downgrading to an older version, etc.

I have installed .NET Framework 4.6.2, which I think has System.Management version 8.0.0.0 but it didn't help. What am I missing? Does anyone have any suggestions? TIA.


Solution

  • Haven't determined the exact solution, but recently installed these items using the Visual Studio 2019 / 2022 installer where I suspect it was either the .NET Framework 4.6.2 SDK and Targeting Pack or the .NET Framework SDK 8.0.302:

    {B662276D-442E-4EFE-9931-3C8F7DE59EFF} Microsoft Teams VDI Citrix plugin                                    Microsoft                  24.15.1.3        Microsoft Teams VDI Citrix plugin
    {0C3457A0-3DCE-4A33-BEF0-9B528C557771} Microsoft Visual C++ 2022 X86 Minimum Runtime - 14.40.33810          Microsoft Corporation      14.40.33810      Microsoft Visual C++ 2022 X86 Minimum Runtime - 14.40.33810
    {3003CC13-9BC4-48D1-95D6-14B2AFE0683B} Microsoft Visual C++ 2022 X64 Debug Runtime - 14.40.33810            Microsoft Corporation      14.40.33810      Microsoft Visual C++ 2022 X64 Debug Runtime - 14.40.33810
    {2DF27D5D-478A-CC3F-EF64-E461BC3B3580} Windows SDK                                                          Microsoft Corporation      10.1.22621.3233  Windows SDK
    {36E492B8-CB83-4DA5-A5D2-D99A8E8228A1} Microsoft SQL Server 2019 LocalDB                                    Microsoft Corporation      15.0.4153.1      Microsoft SQL Server 2019 LocalDB
    {5F01B3C4-9BEC-465D-9C68-BB97D381FFAD} Microsoft .NET Framework 4.6.2 SDK                                   Microsoft Corporation      4.6.01590        Microsoft .NET Framework 4.6.2 SDK
    {82FD8C73-C24D-433C-85A9-48AE93570410} Microsoft Web Deploy 4.0                                             Microsoft Corporation      10.0.8305        Microsoft Web Deploy 4.0
    {872FBB17-01A4-498A-A307-D6CC265B9C2E} ClickOnce Bootstrapper Package for Microsoft .NET Framework 4.6.2... Microsoft Corporation      4.6.01591        ClickOnce Bootstrapper Package for Microsoft .NET Framework 4.6.2...
    {A18D4C2A-07A8-40E4-9797-DD324E6EA4FC} Microsoft .NET Framework 4.6.2 Targeting Pack                        Microsoft Corporation      4.6.01590        Microsoft .NET Framework 4.6.2 Targeting Pack
    {BBDF5D97-8C03-4978-BE1F-D13EAB8D5962} Microsoft .NET SDK 8.0.302 (x64) from Visual Studio                  Microsoft Corporation      8.3.224.28002    Microsoft .NET SDK 8.0.302 (x64) from Visual Studio
    

    After I installed the above then I re-installed Citrix Desktop 2403 (version 24.3.1.97) and it stopped locking up.

    Here is where it indicates that System.Management version 8.0.0 is located in .NET Framework 4.6.2: https://www.nuget.org/packages/System.Management/8.0.0