Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[ERROR] Assembly with name 'Unity.Build.Tests' already exists

Discussion in 'Package Manager' started by Conspiracy, Feb 11, 2020.

  1. Conspiracy

    Conspiracy

    Joined:
    Oct 22, 2016
    Posts:
    40
    Assembly with name 'Unity.Build.Tests' already exists (Packages/com.unity.platforms/Tests/Editor/Unity.Build.Tests/Unity.Build.Tests.asmdef)

    Assembly with name 'Unity.Build.Common' already exists (Packages/com.unity.entities/Unity.Build.Common/Unity.Build.Common.asmdef)

    there's a lot more examples but you get the idea.

    this happens after after updating packages alongside with GUID problems. Unfortunately, unlike the guid problem, I cant seem to find a solution to fix this issue.
     
  2. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    151
    Hi @Conspiracy,

    Could you provide the exact steps to reproduce this issue? e.g. Which packages did you update? How did you perform the update? (via the Package Manager window? by opening your project in a new Unity editor?) Thanks!
     
  3. Conspiracy

    Conspiracy

    Joined:
    Oct 22, 2016
    Posts:
    40
    I Updated the unity platforms package using the package manager, turns out I can just delete the asmdef file in the cache folder to fix the issue
     
  4. kornel-l-varga

    kornel-l-varga

    Joined:
    Jan 18, 2013
    Posts:
    43
    I can confirm this!
    I have downloaded the TIny3D example projects in 2020.1.0a22.2822, everything works except for building the project. So I though I would update the packages in the manager, after updating everything I am receiving the same error. Seems like that the Unity.build does exist in :
    Packages/Build/Editor/Unity.Build
    Packages/Unity Platforms/Editor/Unity.Build

    (it seems like Project Tiny depends on both package though)
     
  5. kornel-l-varga

    kornel-l-varga

    Joined:
    Jan 18, 2013
    Posts:
    43
    By the way, are you building for DOTS? or using the Project Tiny?
    I have finally managed to build. I have done the following:
    - play around with the previous versions of the Unity Platforms in Package Manager, try several to revert to.
    - Build with the Window/Build/Manager and select only the platforms you want to build for, it seems to recompile everything but at least it works.
     
  6. CrashN_Burn

    CrashN_Burn

    Joined:
    Apr 14, 2020
    Posts:
    8
    Can I get a solid solution; i.e. steps on how to fix this problem? I can't just start deleting random files. I need some direction. Here are the errors I'm receiving:

    Assembly with name 'Unity.2D.Sprite.Editor' already exists (Packages/com.unity.2d.sprite/Editor/Unity.2D.Sprite.Editor.asmdef)

    Assembly with name 'Unity.2D.Sprite.Editor' already exists (Assets/com.unity.2d.sprite/Editor/Unity.2D.Sprite.Editor.asmdef)

    Assembly with name 'Unity.2D.Sprite.Package.EditorTests' already exists (Packages/com.unity.2d.sprite/Tests/Editor/Unity.2D.Sprite.Package.EditorTests.asmdef)

    Assembly with name 'Unity.2D.Sprite.Package.EditorTests' already exists (Assets/com.unity.2d.sprite/Tests/Editor/Unity.2D.Sprite.Package.EditorTests.asmdef)

    I have deleted the asmdef. file for one of these and it doesn't seem to be a problem. When I do it to another I get a list of other issues so I just put it back. As of now, my only other solution is to uninstall and reinstall. Any help?
     
  7. CrashN_Burn

    CrashN_Burn

    Joined:
    Apr 14, 2020
    Posts:
    8
    Also, I'm doing this form a Mac if that makes any difference.
     
  8. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    151
    Hi @CrashN_Burn, @Conspiracy & @kornel-l-varga,

    If I understand correctly, these errors are occurring specifically with the
    com.unity.platforms
    package. Since this package is targeted for use with DOTS, you might have better luck asking in the DOTS forums since this isn't strictly an issue with the Package Manager itself:
    https://forum.unity.com/forums/data-oriented-technology-stack.147/

    In the meantime, I have reached out to the
    com.unity.platforms
    team to see if we can get some help. Stay tuned...
     
  9. CrashN_Burn

    CrashN_Burn

    Joined:
    Apr 14, 2020
    Posts:
    8
    Ok thanks, I'll try there as well.
     
  10. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    151
    Hi @CrashN_Burn,

    I got a hint from the DOTS team who told me that the
    com.unity.build
    package got merged into the
    com.unity.platforms
    package a while ago which could lead to the clashing assembly names. Do you still have a reference to
    com.unity.build
    in your project manifest? And just to help with debugging, could you share your complete project manifest?
    </path-to-project>/Packages/manifest.json
     
  11. CrashN_Burn

    CrashN_Burn

    Joined:
    Apr 14, 2020
    Posts:
    8
    Code (CSharp):
    1. {
    2.   "dependencies": {
    3.     "com.unity.2d.sprite": "1.0.0",
    4.     "com.unity.2d.tilemap": "1.0.0",
    5.     "com.unity.collab-proxy": "1.2.16",
    6.     "com.unity.ide.rider": "1.1.4",
    7.     "com.unity.ide.vscode": "1.1.4",
    8.     "com.unity.postprocessing": "2.3.0",
    9.     "com.unity.progrids": "3.0.3-preview.4",
    10.     "com.unity.render-pipelines.universal": "7.1.8",
    11.     "com.unity.test-framework": "1.1.11",
    12.     "com.unity.textmeshpro": "2.0.1",
    13.     "com.unity.timeline": "1.2.10",
    14.     "com.unity.ugui": "1.0.0",
    15.     "com.unity.modules.ai": "1.0.0",
    16.     "com.unity.modules.androidjni": "1.0.0",
    17.     "com.unity.modules.animation": "1.0.0",
    18.     "com.unity.modules.assetbundle": "1.0.0",
    19.     "com.unity.modules.audio": "1.0.0",
    20.     "com.unity.modules.cloth": "1.0.0",
    21.     "com.unity.modules.director": "1.0.0",
    22.     "com.unity.modules.imageconversion": "1.0.0",
    23.     "com.unity.modules.imgui": "1.0.0",
    24.     "com.unity.modules.jsonserialize": "1.0.0",
    25.     "com.unity.modules.particlesystem": "1.0.0",
    26.     "com.unity.modules.physics": "1.0.0",
    27.     "com.unity.modules.physics2d": "1.0.0",
    28.     "com.unity.modules.screencapture": "1.0.0",
    29.     "com.unity.modules.terrain": "1.0.0",
    30.     "com.unity.modules.terrainphysics": "1.0.0",
    31.     "com.unity.modules.tilemap": "1.0.0",
    32.     "com.unity.modules.ui": "1.0.0",
    33.     "com.unity.modules.uielements": "1.0.0",
    34.     "com.unity.modules.umbra": "1.0.0",
    35.     "com.unity.modules.unityanalytics": "1.0.0",
    36.     "com.unity.modules.unitywebrequest": "1.0.0",
    37.     "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    38.     "com.unity.modules.unitywebrequestaudio": "1.0.0",
    39.     "com.unity.modules.unitywebrequesttexture": "1.0.0",
    40.     "com.unity.modules.unitywebrequestwww": "1.0.0",
    41.     "com.unity.modules.vehicles": "1.0.0",
    42.     "com.unity.modules.video": "1.0.0",
    43.     "com.unity.modules.vr": "1.0.0",
    44.     "com.unity.modules.wind": "1.0.0",
    45.     "com.unity.modules.xr": "1.0.0"
    46.   }
    47. }
    48.  
     
    Last edited: Apr 16, 2020
  12. CrashN_Burn

    CrashN_Burn

    Joined:
    Apr 14, 2020
    Posts:
    8
    And to answer your first question, I didn't see a reference to com.unity.build in the manifest. Maybe I overlooked it.
     
  13. FireRuben

    FireRuben

    Joined:
    Nov 26, 2018
    Posts:
    18
    Hey, I'm having this error plus a couple more when I downloaded LWRP, some of the assemblies clash and deleting the .asmdef only causes more issues, is there a way to merge existing assemblies?

    I've tried several unity versions, re-installed packages, re-installed unity, everything you can think of, still can't resolve the problem.
     
  14. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    You'll probably want to post this in the URP subforum instead, as its an issue to do with them as opposed to the actual Package Manager.
     
  15. nubdev

    nubdev

    Joined:
    Mar 30, 2013
    Posts:
    87
    I may have a solution to this, if your experience is anything like mine.

    I tried to open a seperate scene from the one I was working on, and Unity 2019.4.6f1 froze. I left it for a while to let it load but it didnt seem to be doing anything so I used Ctrl+Alt+Delete > End Process to exit the editor.
    I then used windows explorer to find the scene I was trying to open. I opened the scene from windows explorer, at which point Unity said it was from a "previous version" and wanted to port / update it as if I was opening an older project.
    This was a scene that was already in the current project folder created for 2019.4.6f1 so it was strange.

    I let it port / update so that it could open the scene I needed. When it did open the Unity editor, it was an empty scene and there were only a few folders, the entire project missing from the project window.

    It seemed to have made a new project out of the scene and its folder.
    After exiting and opening my actual project, I started getting the "assembly name already exists" errors.
    I tried deleting the asmdef files, which cleared the errors from console but when trying to create new scripts, I could not add them to any game objects as it "could not find the reference". Also the asmdef files would return whenever I opened unity again.

    I ended up fixing it by figuring out that the editor had created a new package folder and library folder in the folder that housed the scene I was trying to open. Deleting these extra folders (not the real ones in your project root but the extra ones created within existing folder hierarchy) ended up fixing the issue, no errors logged, ability to create scripts, assign them and build came back.
     
    EfremenkovAlex and CrashN_Burn like this.
  16. CrashN_Burn

    CrashN_Burn

    Joined:
    Apr 14, 2020
    Posts:
    8
    Thanks bro that really helped!
     
  17. jc2

    jc2

    Joined:
    Jul 14, 2015
    Posts:
    15
    unity is such a bag of S***
     
    nkamath likes this.
  18. EfremenkovAlex

    EfremenkovAlex

    Joined:
    Mar 13, 2017
    Posts:
    4
    Thanks! You saved my day!
     
  19. Sarudan

    Sarudan

    Joined:
    May 21, 2011
    Posts:
    65
    Only for nonces who can't get their head around it.