Search code examples
unity-game-enginemrtk

Problem building unity project with mrtk v2 RC1


I am trying to build a project with unity3d 2018.3.13f1 and MRTK v2 RC1. First I got the errors shown in this SO-post and followed the answers there, so got the windows insider SDK and the errors resolved. Now I get a new amount of them:

enter image description here Nevermind the last error, I had just forgotten to delete the last build.

The first error is quite long so I wont post the full text.

Reference Rewriter found some errors while running with command "--target=Temp\StagingArea\Data\Managed\Assembly-CSharp.dll" "--target=Temp\StagingArea\Data\Managed\Unity.XR.WindowsMR.dll" "--target=Temp\StagingArea\Data\Managed\Unity.TextMeshPro.dll" "--target=Temp\StagingArea\Data\Managed\Unity.Analytics.DataPrivacy.dll" "--target=Temp\StagingArea\Data\Managed\Microsoft.MixedReality.Toolkit.Utilities.Gltf.dll"


Second and third error:

Reference rewriter: Error: field System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position doesn't exist in target framework.


Reference rewriter: Error: field System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Direction doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void

enter image description here

I have checked this, this and this post and tried their solutions but have not gotten it to work yet.

Any help to solve this is appreciated! Tell me if some info is missing.


Edit

Tried building again and got the same errors as above except the last one as explained above as well. This time console say that the build was succeeded even though all the errors.


Solution

  • The "Reference Rewriter" errors can safely be ignored. This is actually a bug with Unity's build system, and we are tracking the issue MRTK-side using this bug.

    As a rule of thumb, if you see "Build Succeeded" then the build has actually worked, even if you see Unity printing error messages. You can safely open the built UWP folder and deploy your project.