Search Unity

  1. Curious about what's going to be in 2021.1? Have a look at the 2021.1 beta blog post.
    Dismiss Notice

UNetWeaver error: Method not found: 'Mono.Cecil.ModuleDefinition.ImportReference'

Discussion in '5.5 Beta' started by aaronjbaptiste, Sep 4, 2016.

  1. aaronjbaptiste

    aaronjbaptiste

    Joined:
    Dec 4, 2012
    Posts:
    53
    Upgraded from 5.4 to 5.5b (OSX) and have this compile error:

    UNetWeaver error: Exception :System.MissingMethodException: Method not found: 'Mono.Cecil.ModuleDefinition.ImportReference'.
    0. Unity.UNetWeaver.Weaver.Weave()
    1. Unity.UNetWeaver.Weaver.WeaveAssemblies()
    2. Unity.UNetWeaver.Log.Error() /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:20
    3. Unity.UNetWeaver.Weaver.WeaveAssemblies() /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/UNetWeaver.cs:1770
    4. Unity.UNetWeaver.Program.Process() /Users/builduser/buildslave/unity/build/Extensions/Networking/Weaver/Program.cs:34
    5. UnityEditor.Scripting.Serialization.Weaver.WeaveUnetFromEditor()
     
  2. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    I've got the same issue here, although it's in a very complex project. Naturally Unity will want a repro-project / bug report so I'll try and dissect the cause. There were no DLLs or particular functions pointed out in the stack trace but I don't imagine it'll take too long. Will update when I can.

    Update:

    Hmm, adding files and folders one by one, the issue appears to happen after adding the resources to the scene. However, adding the resource folder on its own does not trigger it.

    While the project on its own is reasonably small, being less than 10mb, its an enterprise solution and sadly that without being to split it up is not viable to upload.
     
    Last edited: Sep 5, 2016
  3. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    Found it!

    Just to confirm, this issue is still present in beta 2.

    I have been able to reproduce it by creating a new project, and adding the Unity Test Tools package to the assets folder. Nothing else.

    I've submitted a repro project, ticket #830313.

    @aaronjbaptiste, I don't suppose you are also using the Unity Test Tools?

    Either way I imagine the actual issue lies within how these tools communicate with the test runner and the editor.

    Edit:

    The case doesn't seem to display correctly for me.. In case there was an error with the bug submission, I've attached the repro project to this post.
     

    Attached Files:

  4. aaronjbaptiste

    aaronjbaptiste

    Joined:
    Dec 4, 2012
    Posts:
    53
    Great job @JJJohan finding the issue, yes I am using the test tools.
     
  5. Tomek-Paszek

    Tomek-Paszek

    Unity Technologies

    Joined:
    Nov 13, 2012
    Posts:
    116
    Hi guys!

    The package has been updated for 5.5. I removed Mono.Cecil dependency as it wasn't needed anymore. It should get be available on the Asset Store soon.
    We are looking into the issue anyways as it could be not related to UTT.
    Thanks for reporting it!

    Tomek
     
    McGravity likes this.
  6. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,463
    I just faced this issue in 5.5 beta 3.

    I realize the fix was made in Unity test tools and that it should work fine soon, but the real issue from my viewpoint is that UNet weaver fails compilation, we are not even using UNET !!
     
  7. Primerist

    Primerist

    Joined:
    Sep 19, 2016
    Posts:
    5
    I have this error too in b6. Deleted test tools, error persists. UNET Weaver. Also: BCE0011: An error occurred during the execution of the step 'Boo.Lang.Compiler.Steps.SaveAssembly': 'Sharing violation on path C:\ ... \Temp\Assembly-UnityScript-firstpass.dll.mdb'.
     
  8. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,463
    Try to see if you have a copy of Mono.Cecil.dll in your project somewhere
     
  9. Primerist

    Primerist

    Joined:
    Sep 19, 2016
    Posts:
    5
    I did not have Cecil. Strangely, it would not show any syntax errors specifically but it would report the errors prevented it from compiling sometimes as well. I kept quitting Unity, trying to change things, reopening, fixing things, getting stuck again, quitting, about 20 times while I continued deleting possibly unnecessary conflicting things and fixing various API changes. Finally, it crashed every time I opened the project. The next step is probably to test erasing the Library and trying to reimport or systematically removing folders until it stops crashing. I got Probuilder 5.5 support working but my motivation to switch to 5.5 was to get shader keywords. To my dissapointment a lot of shaders are broken pink by it including UBER so I will have to sit it out till 5.5 final and wider support by assets and fight with 128 shader keyword limit in 5.4 till then.
     
  10. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,463
    were you able to work it out, after deleting Library and reimporting everything ?
     
  11. Tim-Page

    Tim-Page

    Joined:
    Nov 23, 2015
    Posts:
    3
    Does the current version of Unity Test Tools on the asset store (1.5.9 Sep 12, 2016) have the fix in? I've reimported to take that version, and still get the same error:

    UNetWeaver error: Exception :System.MissingMethodException: Method not found: 'Mono.Cecil.ModuleDefinition.ImportReference'.

    Thanks,
    Tim
     
    fsproru and GilesDMiddleton like this.
unityunity