I have a mono project that runs fine on my computer (running Ubuntu 16.04), but when I upload it on Ubuntu in AWS, it throws this exception:
System.TypeInitializationException: The type initializer for 'Amazon.AWSConfigs' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
On the Ubuntu server, I've installed mono using sudo apt-get install mono-runtime
. I assume this didn't install the DLL for System.Xml.Linq.
Note the error isn't about the assembly reference, it's about the actual assembly DLL file missing. Using strace mono ParamStoreTest.exe
shows that it tries to search for the DLL but can't find it:
open("/usr/lib/System.Xml.Linq.dll", O_RDONLY) = -1 ENOENT (No such file or directory)