title: Binary converter misses mscorlib on ARM
body: <p>I have a telegram bot written in c# and using .net-core 2.1. Now I am trying to run this application in a docker container on a raspberry pi. During the run I save a configuration file using the formatter <code>System.Runtime.Serialization.Formatters.Binary</code>. According to <a href="https://stackoverflow.com/a/42704419/3795043">this question</a> this binary formatter should be included in .net-core 2.1, right? But writing using the binary formatter fails with this exception. (Reading seems to work although the file is incomplete since writing always fails):</p>
  
  <pre><code>Exception when writing the modules: System.TypeInitializationException: The type initializer for 'System.Runtime.Serialization.Formatters.Binary.Converter' threw an exception. ---&gt; System.IO.FileNotFoundException: Could not load file or assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
  </code></pre>
  
  <p>I can run the application on windows 10, in a container in docker for windows 10 and on hypriot linux on the raspberry with ARM. The exception only happens in the docker container on the raspberry pi. </p>
  
  <p>Any idea how I can solve this? Will I have to switch to a different serializer even though the binary formatter is supposed to be included in .net-core 2.1? I come from java and the easiest included approach there is binary so I just used it in c# as well.</p>
  
  <p>You can find the whole project in <a href="https://github.com/lehrbaumm/telegram_bot/tree/feature/dotnetcore2.1" rel="nofollow noreferrer">this github project</a>. The file dockerARM contains the docker configuration for docker on the raspberry pi. If you want to run the application you need a telegram bot API key. The whole docker-compose build log including the exception can be found <a href="https://pastebin.com/EJQBVn3X" rel="nofollow noreferrer">here</a>. There are a bunch of errors in the dotnet publish step I can't say I understand them. But the step succeeds.</p>