Skip to content

TypeLoadException: Could not resolve type from typeref (expected class System.Reflection.Assembly in assembly System.Runtime) #116

@jpadillaperez

Description

@jpadillaperez

Hi everyone! First of all, I would like to express my sincere appreciation for the effort put into developing the project. I have been working on it for the past six months, attempting to create custom messages for ROS2 in Hololens 2.

I have been trying to renew the project of ms-iot/ros_msft_mrtk_native by building ROS2 from scratch for Unity and ARM64 for been able of building customized messages for ROS2 in Hololens 2. I have spent quite some time but I don't manage to make it work. The error that I encounter is related to ros2 dotnet and its dependencies, so I hope that I can find some guidance here.
After building ros2 dotnet successfully, without any customized message, once I try to use it in Unity. The following dependency error appear:

TypeLoadException: Could not resolve type with token 01000011 from typeref (expected class 'System.Reflection.Assembly' in assembly 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') ROS2.RCLdotnetDelegates..cctor () (at C:/opt/target/src/ros2_dotnet/ros2_dotnet/rcldotnet/RCLdotnet.cs:130)

This error appears in the lines of initialization and spin of ROS2.NET for both, the Unity Editor and the Hololens 2 App

I'm building on Windows 10, currently using .Net 5, Visual Studio 2019 and building for ROS2 Foxy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions