' IBM437'不是受支持的编码名称

时间:2018-05-21 12:50:16

标签: .net ionic-framework .net-core zipfile

我有这个错误,

'IBM437' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
Parameter name: name
at System.Globalization.EncodingTable.internalGetCodePageFromName(String name)
at System.Globalization.EncodingTable.GetCodePageFromName(String name)
at System.Text.Encoding.GetEncoding(String name)
at Ionic.Zip.ZipFile..ctor(String fileName)
at ConnexusDomain.AppBridge.DecompressFile(String zipfilename, String userID)
console-via-logger.js (173,15)

当我的代码到达这行代码

时会发生这种情况
ZipFile zip = new ZipFile(Windows.Storage.ApplicationData.Current.LocalFolder.Path + "\\" + zipfilename + ".zip");

我已经尝试了THIS解决方案。但是,当它到达 Encoding.RegisterProvider(CodePagesEncodingProvider.Instance)时,我有一个错误;

ERROR Error: Uncaught (in promise): WinRTError: The text associated with this error code could not be found.

System.IO.FileLoadException: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at ConnexusDomain.AppBridge.DecompressFile(String zipfilename, String userID)
WinRTError: The text associated with this error code could not be found.

System.IO.FileLoadException: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at ConnexusDomain.AppBridge.DecompressFile(String zipfilename, String userID)

我使用Ionic Framework进行编码,并使用C#(.Net Core 2.0)桥接一些功能。

有什么想法吗?谢谢!

0 个答案:

没有答案