Could not load file or assembly 'System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. #442
Replies: 4 comments 5 replies
-
Hi, try to experiment with lower versions. For example HttpSanitizer below 7.x does not use above assembly. m |
Beta Was this translation helpful? Give feedback.
-
but it has know vulnerability issues - I'm having the same problem but with System.Collections.Immutable 8.0.0.0 and even if I install this package manually it won't ever work. |
Beta Was this translation helpful? Give feedback.
-
Which framework are you targeting? |
Beta Was this translation helpful? Give feedback.
-
FWIW, I don't see this error in either a .NET6 or a .NET8 application, so it's probably not an issue with the library. |
Beta Was this translation helpful? Give feedback.
-
I am getting error like "The type initializer for 'Ganss.Xss.HtmlSanitizerDefaults' threw an exception.
Could not load file or assembly 'System.Collections.Immutable'".
Below are the list of packages are used in my solution
below is stack trace from log file:
04/10/2023 22:21:29.107 (0000001F) 1000021�Action handler GETCHATTEXTV10 threw an exception.�System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Ganss.Xss.HtmlSanitizerDefaults' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at Ganss.Xss.HtmlSanitizerDefaults..cctor()
--- End of inner exception stack trace ---
at Ganss.Xss.HtmlSanitizer..ctor()
at UCN.Agent.AgentApiEventHelper.SanitizeChatHTML(String html) in D:\Agents\6\inContact\CHTXRS-API\src\Code\C#\Services\VCSvc\Providers\Agent\AgentApiEventHelper.cs:line 1890
at UCN.Agent.AgentApiEventHelper.InterperetPatronCommEvent(List
1 eventMessages, Int32 chatId, Int32 requestId, Int32 version, Boolean& isValidChatEvent, Int32[] busNo) in D:\Agents\6\inContact\CHTXRS-API\src\Code\C#\Services\VCSvc\Providers\Agent\AgentApiEventHelper.cs:line 2190 at UCN.Agent.AgentApiEventHelper.ParseChatTextEvents(GetChatTextOutput& output, GenericSessionInfo chatSessionInfo, Int32 queueID, Int32 chatId, EventMessage eventMessages, Int64 contactID, SessionState state, Int32 requestId, Int32 version, Int32[] busNo) in D:\Agents\6\inContact\CHTXRS-API\src\Code\C#\Services\VCSvc\Providers\Agent\AgentApiEventHelper.cs:line 1902 at inContact.API.ActionHandlers.ApiActionHandlerOverrides.GetChatTextV10(BusinessUnitAuthContext authContext, String& chatSession, JArray& messages, Nullable
1 timeout) in D:\Agents\6\inContact\CHTXRS-API\src\Code\WebDevelopment\API\Endpoints\Api\ActionHandlers\ApiActionHandlerOverrides.cs:line 2839--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at inContact.API.ActionHandlers.MethodActionHandler.Invoke(KeyValuePair
2[] args) in D:\Agents\6\inContact\CHTXRS-API\src\Code\WebDevelopment\API\Endpoints\Api\ActionHandlers\MethodActionHandler.cs:line 96 at inContact.API.Controllers.DynamicActionController.ServiceDynamically(ActionHandler actionHandler, KeyValuePair
2[] actionHandlerArgs) in D:\Agents\6\inContact\CHTXRS-API\src\Code\WebDevelopment\API\Endpoints\Api\Controllers\DynamicActionController.cs:line 173��(Z,ZZ,&140735166586464,)�04/10/2023 22:21:29.107 (0000001F) 1000021�GETCHATTEXTV10: Action handler threw an exception.
Exception has been thrown by the target of an invocation.
The type initializer for 'Ganss.Xss.HtmlSanitizerDefaults' threw an exception.
Could not load file or assembly 'System.Collections.Immutable, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
��(Z,ZZ,&140735166585848,)�
Beta Was this translation helpful? Give feedback.
All reactions