Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Mono Upgrade Unable to compile a project

Discussion in 'Experimental Scripting Previews' started by Goldseeker, Sep 29, 2016.

  1. Goldseeker

    Goldseeker

    Joined:
    Apr 2, 2013
    Posts:
    42
    First time i open the project it shows the following errors:

    Code (csharp):
    1.  
    2. UNetWeaver error: Exception :System.MissingMethodException: Method 'Mono.Cecil.ModuleDefinition.ImportReference' not found.
    3.   at Unity.UNetWeaver.Weaver.Weave (System.String assName, System.Collections.Generic.IEnumerable`1[T] dependencies, Mono.Cecil.IAssemblyResolver assemblyResolver, System.String unityEngineDLLPath, System.String unityUNetDLLPath, System.String outputDir) [0x0004b] in C:\buildslave\unity\build\Extensions\Networking\Weaver\UNetWeaver.cs:1652
    4.   at Unity.UNetWeaver.Weaver.WeaveAssemblies (System.Collections.Generic.IEnumerable`1[T] assemblies, System.Collections.Generic.IEnumerable`1[T] dependencies, Mono.Cecil.IAssemblyResolver assemblyResolver, System.String outputDir, System.String unityEngineDLLPath, System.String unityUNetDLLPath) [0x0006e] in C:\buildslave\unity\build\Extensions\Networking\Weaver\UNetWeaver.cs:1763
    5. UnityEngine.Debug:LogError(Object)
    6. Unity.UNetWeaver.Log:Error(String) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:20)
    7. Unity.UNetWeaver.Weaver:WeaveAssemblies(IEnumerable`1, IEnumerable`1, IAssemblyResolver, String, String, String) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1770)
    8. Unity.UNetWeaver.Program:Process(String, String, String, String[], String[], IAssemblyResolver, Action`1, Action`1) (at C:/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:34)
    9. UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String, Boolean)
    10.  
    Code (csharp):
    1.  
    2. Failure generating network code.
    3. UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor(String, String, String, String, Boolean)
    4.  
    If i try to recompile error changes:
    Code (csharp):
    1.  
    2. Assets/Packages/GluOn/GluOnSDK/Gluon/GluonImpl.cs(257,53): warning CS0618: `UnityEngine.RuntimePlatform.WindowsWebPlayer' is obsolete: `WebPlayer export is no longer supported in Unity 5.4+.'
    3. Assets/Packages/GluOn/GluOnSDK/Gluon/GluonImpl.cs(257,113): warning CS0618: `UnityEngine.RuntimePlatform.OSXWebPlayer' is obsolete: `WebPlayer export is no longer supported in Unity 5.4+.'
    4. Assets/Tests/AppLovin/AppLovinService.cs(44,29): warning CS0067: The event `Glu.IoCSample.Tests.AppLovin.AppLovinService.onAvailabilityChanged' is never used
    5.  
    6. Unhandled Exception:
    7. System.IO.IOException: Sharing violation on path C:\UnityProjects\IoCSample_double\Temp\Assembly-CSharp.dll.mdb
    8.  
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    Thanks for reporting this. It seems that we're mixing up a Mono.Cecil version somewhere. Can you submit a bug report and include this project? Please let me know the bug report number here after it is submitted.

    Note that we neglected to include the bug reporter in this preview build, so you'll need to use a different version of Unity to submit the bug report. Thanks!
     
  3. Goldseeker

    Goldseeker

    Joined:
    Apr 2, 2013
    Posts:
    42
    Unfortunately, i'm not in liberty to submit this project anywhere beyond my company, sorry
    I'll be happy to provide any additional info, if you need any
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    Ok, we'll have a look at this internally then and try to reproduce it. Can you still submit a bug report? I would like to be able to feedback to you when it is corrected.
     
  5. Goldseeker

    Goldseeker

    Joined:
    Apr 2, 2013
    Posts:
    42
    Submitted a bug: case number is 836502.
    Hope you'll be able to fix it without repro project.
    Thank you!
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    Thanks, we will investigate!
     
  7. tcoursow

    tcoursow

    Joined:
    Nov 25, 2016
    Posts:
    1
    I have the same issue after upgrading to Unity 5.5.
    Sadly I can also not share an example project.

    But I can say that if I close the editor then, and reopening it, change some code file (for example adding a space after a semicolon) and rebuild... the rebuilddoes take an infinite amount of time (have to kill unity then)
     
  8. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @tcoursow

    That is odd. Initially we thought that this issue was related to the new Mono runtime in the preview build, but 5.5 is using the same Mono runtime as 5.4. So maybe we don't fully understand this problem.

    Is it possible for you to remove the sensitive information from the project that causes this? I'd really like to have a look at it if we can, so that we can correct this.
     
  9. KJoanette

    KJoanette

    Joined:
    Jun 8, 2013
    Posts:
    59
    0x000000014150FC5B (Unity) StackWalker::GetCurrentCallstack
    0x000000014151190E (Unity) StackWalker::ShowCallstack
    0x00000001414E0A93 (Unity) GetStacktrace
    0x00000001411E1E1A (Unity) DebugStringToFile
    0x00000001411E228C (Unity) DebugStringToFile
    0x000000014116C938 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    0x0000000028433BDB (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,string,UnityEngine.Object)
    0x0000000028433AC4 (Mono JIT Code) [DebugLogHandler.cs:10] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    0x0000000028433455 (Mono JIT Code) [Logger.cs:42] UnityEngine.Logger:Log (UnityEngine.LogType,object)
    0x000000002849F593 (Mono JIT Code) [DebugBindings.gen.cs:117] UnityEngine.Debug:LogError (object)
    0x00000000284613C4 (Mono JIT Code) [Weaver.cs:106] UnityEditor.Scripting.Serialization.Weaver:WeaveInto (string,string,string,string,string[],Mono.Cecil.IAssemblyResolver)
    0x000000002845FD08 (Mono JIT Code) [Weaver.cs:74] UnityEditor.Scripting.Serialization.Weaver:WeaveUnetFromEditor (string,string,string,string,bool)
    0x000000002845FEEE (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_bool_object_object_object_object_sbyte (object,intptr,intptr,intptr)
    0x000007FEE14054A3 (mono) [mini.c:4937] mono_jit_runtime_invoke
    0x000007FEE13583F1 (mono) [object.c:2623] mono_runtime_invoke
    0x00000001411FEB8F (Unity) scripting_method_invoke
    0x0000000140E325F5 (Unity) ScriptingInvocation::Invoke
    0x00000001412549BA (Unity) WeaveUnetInEditor
    0x00000001401AB4C6 (Unity) CleanupMonoCompilationPipeline
    0x000000014019FFE7 (Unity) UpdateMonoCompileTasks
    0x00000001401AC497 (Unity) RecompileScripts
    0x00000001401AC82C (Unity) LoadMonoAssembliesAndRecompileIfNecessary
    0x0000000141489495 (Unity) Application::InitializeProject
    0x000000014154F397 (Unity) WinMain
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @KJoanette

    Sorry, I don't follow. Can you provide some more information about how this call stack applies to this forum thread?
     
  11. ofm_adrian

    ofm_adrian

    Joined:
    May 23, 2016
    Posts:
    1
    Hi, we seem to be having the same problem. When we removed the UnityTestTools the project compiles again. The UTT include a Mono.Cecil.dll, is there another unity internal one? It's the only Cecil.dll we have in the project.
     
  12. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @ofm_adrian

    I'm not sure if there is another Cecil assembly that is being used. That seems plausible though. Can you submit a bug report with a project to reproduce this? We would love to have a look at it.
     
  13. RAACosta

    RAACosta

    Joined:
    Jan 23, 2015
    Posts:
    1
  14. jkramar

    jkramar

    Joined:
    Jul 10, 2014
    Posts:
    1
    Had the same problem upgrade to 5.5.0f3. @RAACosta's solution worked for me.