Good morning, we are developing a dll that uses ServiceStack.Text.dll (5.4). The installation in the project was done via nuget. Locally the application works fine while on a server machine it has problems. The following error occurs when loaded into memory and run on in Windows Server 2012 r2 standard . We have the following error:
System.TypeInitializationException: The type initializer for 'ServiceStack.Text.TypeSerializer' threw an exception. ---> System.TypeInitializationException: The type initializer for 'ServiceStack.Text.JsConfig' threw an exception. ---> System.IO .FileNotFoundException: Could not load file or assembly 'System.Memory, Version = 4.0.1.0, Culture = neutral, PublicKeyToken = cc7b13ffcd2ddd51' or one of its dependencies.
The system cannot find the file specified. But in our build folder the indicated system.memory is available and also its dependencies.
Do you have any suggestions?
You'll likely need an Assembly Binding in your
Web.Config(orApp.Configfor non Web Apps) to reference the version of System.Memory your project has referenced, something like: