.NET 6 Support on Linux
See original GitHub issueDescribe the bug .MSG files are not able to be read/parsed on .NET 6 when the code is running on linux.
One of the .NET 6 breaking changes is that it now no longer supports the system.drawing.common on linux. (see .net 6 breaking change here)
The exception you get is:
Error Message: System.TypeInitializationException : The type initializer for 'Gdip' threw an exception. ---- System.PlatformNotSupportedException : System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information. Stack Trace: at System.Drawing.SafeNativeMethods.Gdip.GdipGetGenericFontFamilySansSerif(IntPtr& fontfamily)
For .NET 5, you are able to install the linux package libgdiplus to have it work, but this no longer is a workaround.
To Reproduce Steps to reproduce the behavior:
- Try processing a .msg email in a .NET 6 application on linux
Expected behavior The .msg email will be able to be parsed.
Desktop (please complete the following information):
- OS: Linux
- .NET 6
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:33 (18 by maintainers)
Always find it funy (in a good way) that I have so much contact with people that work for Microsoft and use MSGReader (that is build by me that does not work for Microsoft)… because Microsoft invented the MSG format
If there is still an issue than please open a new issue instead of reusing this one. I always get lost in issues that are already closed.
I just published version 5.4.0 that should get rid of the System.Drawing.Common problem on Linux because it is now only tied to the .NET 4.6.2 framework that only works on Windows