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

Bug UWP Built fresh project doesn't work (VS project unloaded), and duplicate assimp.dll

Discussion in 'Robotics' started by RendergonPolygons, Dec 19, 2022.

  1. RendergonPolygons

    RendergonPolygons

    Joined:
    Oct 9, 2019
    Posts:
    98
    Describe the bug
    A fresh Unity project with imported URDF package builds an sln does throws errors and can't be used to deploy in Hololens 2.

    After building in Unity, I open the .sln project but the UWP project says unloaded)
    upload_2022-12-19_12-22-44.png

    The only error shown in VS2022 v17.4.3
    C:\Temp\testproject\Build-Dev\testproject\testproject.vcxproj : error : Cannot load project with duplicated project items: C:\Temp\testproject\Build-Dev\testproject\assimp.dll is included as 'None' and as 'None' item types.

    To Reproduce
    Steps to reproduce the behavior:

    1. Create new fresh Unity project Unity 2021.3.15 (all tested versions outlined below) switch to URP, set .NET Framework api compatibility
    2. Add ROS TCP Connector and URDF importer packages from url.
    3. Build for release, add scene, open visual studio .sln project, the UWP project can't be deployed, VS says project unloaded and VS shows error . VS2022 17.4.3
    upload_2022-12-19_12-23-11.png

    upload_2022-12-19_12-23-37.png

    Only 1 error shown in VS output window:
    C:\Temp\testproject\Build-Dev\testproject\testproject.vcxproj : error : Cannot load project with duplicated project items: C:\Temp\testproject\Build-Dev\testproject\assimp.dll is included as 'None' and as 'None' item types.

    1. Move URDF importer into assets/packages as Unable to build, generated messages could not find suitable override and namespace #215 leads to same error result. After moving the folder I also made sure Unity-Robotics-Hub\tutorials\pick_and_place\PickAndPlaceProject\Library\PackageCache\com.unity.robotics.ros-tcp-connector@c27f00c6cf\Runtime\Unity.Robotics.ROSTCPConnector.asmdef includes Platform UWP
    2. Moving also ROS TCP Connector package as in 5 above also continues to show same error in VS. After moving the folder I also changed Unity-Robotics-Hub\tutorials\pick_and_place\PickAndPlaceProject\Packages\com.unity.robotics.urdf-importer@https://github.com/Unity-Technologies/URDF-Importer/commit/90f353e4352aae4df52fa2c05e49b804631d2a63\Runtime\Unity.Robotics.URDFImporter.asmdef to include Platform UWP
    3. Also tried Regenerate Project files but has the same error:
    upload_2022-12-19_12-23-58.png

    4. I also tried selecting Editor and UWP, but also only UWP in asimpNet.dll as per this suggestion but the same error happens.

    I also tried deleting the Library, vcxproj but didn't make any difference to the error result.

    Console logs / stack traces
    The only error shown in VS is as shown above. Unity does not show any errors when building.

    Expected behavior
    VS sln opens so we can deploy to Hololens 2.

    Screenshots
    If applicable, add screenshots or videos to help explain your problem.

    Environment (please complete the following information, where applicable):

    Unity Version: Unity 2021.3.15f1, Unity 2020.3.11, Unity 2022.1.24
    Visual Studio 2022 v17.4.3
    Unity machine OS + version: Windows 11 Pro, v 10.0.22.621 Build 22621
    ROS machine OS + version: Didn't launch it because the problem is built project by Unity doesn't work
    ROS–Unity communication: n/a
    Branch or version:
    upload_2022-12-19_12-24-17.png

    Additional context
    Can't use this package for UWP builds for Hololens 2.
    Bug also posted at URDF importer and Unity Robotics Hub
    Also if the unity robotics pickandplace project is opened fresh and try to build for UWP (.NET Framework) the same error occurs.
     
    Last edited: Dec 19, 2022
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    assimp.dll in that package seems to be misconfigured in the plugin inspector. It causes Unity to be confused about what to do with it.
     
  3. RendergonPolygons

    RendergonPolygons

    Joined:
    Oct 9, 2019
    Posts:
    98
    Thanks for your response @Tautvydas-Zilys , I tried changing the settings in the inspector but had no results, any suggestions to make it work?
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Well, the issue is that you cannot really change settings for things in a package, as packages are considered read only. So you would have to first copy the package to your project Packages folder in order to modify it. There are two assimp.dll files as far as I can tell, one for x86 and one for x64. Both need to be configured correctly.

    Both of the DLL files are compiled for Windows desktop, so using them on UWP is not going to work. Therefore the correct way to configure them is to exclude them from UWP build (that will not make them "work", but at least will not prevent the build from launching).

    The real issue is that it seems that this package for whatever reason doesn't have support for all runtime platforms. I don't know why that is, unfortunately. It's either that this DLL was never meant to be used at runtime and was only supposed to be used in the editor (in which case its plugin settings need to be fixed), or the package is still in its infancy and they haven't gotten to making it work on all platforms. We'll have to wait for folks maintaining the package to respond :) (which is likely to not happen until the new year).
     
  5. RendergonPolygons

    RendergonPolygons

    Joined:
    Oct 9, 2019
    Posts:
    98
    Thank you @Tautvydas-Zilys I’ll dig in and post, I wish you and your team a fantastic Xmas break!