joexi / Excel4Unity

Excel for Unity. Provides both read and write with .xls and .xlsx
213 stars 56 forks source link

how to fix error 437 when use IL2CPP Build? #8

Closed feipinxiang closed 2 years ago

feipinxiang commented 2 years ago

unity version 2020.3.15f2 Epplus.dll version 4.1.0.0 Is running perfect when use mono mode.(just need cope some I18N.*.dll to build folder) but if buid using IL2CPP i get the 437 error,what did i miss?(NotSupportedException: Encoding 437 data could not be found. )

  1. I tryed creat link.xml file in unity project Asset folder.

    <linker>
    <assembly fullname="I18N">
        <type fullname="I18N.Common" preserve="all"/>
        <type fullname="I18N.Common.ByteEncoding" preserve="all"/>
        <type fullname="I18N.Common.Handlers" preserve="all"/>
        <type fullname="I18N.Common.Manager" preserve="all"/>
        <type fullname="I18N.Common.MonoEncoder" preserve="all"/>
        <type fullname="I18N.Common.MonoEncoding" preserve="all"/>
        <type fullname="I18N.Common.Strings" preserve="all"/>
    </assembly>
    
    <assembly fullname="I18N.West">
        <type fullname="I18N.West" preserve="all"/>
        <type fullname="I18N.West.ENCwindows_1252" preserve="all"/>
        <type fullname="I18N.West.CP1252" preserve="all"/>
        <type fullname="I18N.West.ENCibm437" preserve="all"/>
        <type fullname="I18N.West.CP437" preserve="all"/>
    </assembly>
    </linker>
  2. I tryed .Net4.x and .NET Standard2.0
  3. I tryed add I18N.*.dll to Build folder.(copy from C:\Program Files\Unity\Hub\Editor\Unity2020.3.15f2\Editor\Data\MonoBleedingEdge\lib\mono\unity or unityjit folder)
feipinxiang commented 2 years ago

Solution:

  1. creat link.xml file
  2. copy I18N.*.dll to assets/Plugins folder.
  3. rebuild