Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity.Localization.Editor.dll incompatible with APIUpdate process in newer LTS?

Discussion in 'Localization Tools' started by jerome-lacoste, Feb 14, 2022.

  1. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    206
    Hello, we opened #1172128 on core support.

    We are having a weird issue in a component of the APIUpdater that fails processing the Localization.Editor.dll in some scenarios (happens with 2020.3.26f1 but not with 2020.3.12f1 it seems).

    APIUpdater.NonObsoleteApiUpdaterDetector.exe fails with

    standard output

    Code (CSharp):
    1. Can't find custom attr constructor image: /PATH/TO/PROJECT/Library/ScriptAssemblies/Unity.Localization.Editor.dll mtoken: 0x0a000025 due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. assembly:System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:<unknown type> member:(null) signature:<none>
    standard error

    Code (CSharp):
    1. Unhandled Exception:
    2. System.IO.FileNotFoundException: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
    3. File name: 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
    4.   at (wrapper managed-to-native) System.MonoCustomAttrs.GetCustomAttributesDataInternal(System.Reflection.ICustomAttributeProvider)
    5.   at System.MonoCustomAttrs.GetCustomAttributesData (System.Reflection.ICustomAttributeProvider obj) [0x0000e] in <695d1cc93cca45069c528c15c9fdd749>:0
    6.   at System.Reflection.CustomAttributeData.GetCustomAttributesInternal (System.RuntimeType target) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
    7.   at System.RuntimeType.GetCustomAttributesData () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
    8. [...]
    We'll be working on a repro
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Thats strange. I have not seen anything like this. Ill wait for your repo.
     
  3. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    206
    Hei @karl_jones we've sent a minimal extract of the failure to core support. It would be great to have some insights about what the tools don't like about the Unity.Localization.Editor.dll.
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Do you have the bug number? The one you mentioned previously, 1172128 does not seem correct. It takes me to a 2019 duplicate bug "I just open the new created VR Project and click play"
     
  5. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    206
    Yes, it is 1172128 in core support. (not the public bug tracker)
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Ah sorry, ok I have found it. We do have some script upgrades in our code, so I guess that could be the issue. Its strange because they are tested as part of the package tests so I would have expected something like that to be detected.
    One thing to try is to comment out all the [Obsolete] attributes in the package, you will need to embed the package to make changes(place it in the project Packages folder).
    Also make sure you are using the latest localization package as I think we fixed some upgrade issues in 1.1.1.
    If the error is coming from Unity.Localization.Editor.dll then it could be the SheetsServiceProvider.deprecated.cs file or LocalizationEditorSettings.cs FindSimiliar Key method.
     
  7. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    206
    We're trying this. Thanks.
     
    karl_jones likes this.
  8. jerome-lacoste

    jerome-lacoste

    Joined:
    Jan 7, 2012
    Posts:
    206
    So we've tried to
    1. remove the dependency on the official localization package (from upm manifest)
    2. update to latest version in source code format, placing it under Assets/
    3. comment out the Obsolete tags

    the build still fails with the same symptoms.

    How can we troubleshoot this further?

    Could we have a version of APIUpdater.NonObsoleteApiUpdaterDetector.exe that outputs more information that we can hotswap into our build environment?

    Is there a way to know which dependency is missing?
     
    Johste likes this.
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Unfortunately, I don't know enough about the APIUpdater to be able to help here however I can see that Sergio, on your core support ticket, has reached out to the developer so I would wait to see what they say.