Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Windows, Version=255.255.255.25

Discussion in 'Windows' started by T3quila, Jan 12, 2016.

  1. T3quila

    T3quila

    Joined:
    Jan 12, 2016
    Posts:
    2
    getting this error when I build for Windows Store, how do I figure out what's causing it?

    Unity: 5.3.1f1
    Windows: 10 pro 64-bit version 1511 (OS Build 10586.36)
    Visual Studio: Community 2015 Version 14.0.24720.00 Update 1

    Build settings
    Platform: Windows Store
    SDK: Universal 10
    Scripting Backend: IL2CPP
    Strip Engine Code: off

    stdout:
    Fatal error in Mono CIL Linker
    Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null'
    at Mono.Linker.LinkContext.Resolve(IMetadataScope scope)
    at Mono.Linker.Steps.LoadReferencesStep.ProcessReferences(AssemblyDefinition assembly)
    at Mono.Linker.Steps.LoadReferencesStep.ProcessReferences(AssemblyDefinition assembly)
    at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
    at Mono.Linker.Pipeline.Process(LinkContext context)
    at Mono.Linker.Driver.RunDriver(Driver driver)
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:94)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:107)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:100)
    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:201)
    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:131)
    UnityEditorInternal.IL2CPPBuilder:Run() (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:201)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:128)
    PostProcessUAPIl2Cpp:RunIL2CPP() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUAPIl2Cpp.cs:92)
    PostProcessWinRT:process() (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:131)
    UnityEditor.HostView:OnGUI()
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,823
    Because you're building to il2cpp, you're not allow to use assemblies which are compiled against .NET Core or .NET 4.x.

    In future Unity versions, it should explicitly say what assembly references Windows.winmd, but currently you have to check plugin settings for assemblies, and set Scripting Backend == .NET for those which are compiled against .NET Core.
     
  3. T3quila

    T3quila

    Joined:
    Jan 12, 2016
    Posts:
    2
    changed the ScriptingBackend to "Dot Net" for the following none editor DLLs - now I get errors to do with names not existing - I guess because the DLL is not being included in the build at all, so I need a version of each of theses DLLs which are not "compiled against .NET Core or .NET 4.x."?

    \Assets\Plugins\UnityPerf\UnityEngine.CrashLog.dll
    \Assets\Plugins\Metro\unibill.dll
    \Assets\Parse\Parse.Unity.dll
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,710
    That is correct. By just changing scripting backend for plugins you simply excluded them from il2cpp build entirely.
    You should probably go with .NET scripting backend for your project.
    Other alternative is, if your placeholder plugins for editor are fully implemented, mark those as WSA/il2cpp compatible.
     
  5. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    I have the exact same problem!

    Is this already available?
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,628
    You can use ILSpy software to drop your DLLs into it and see what other assemblies they reference.