Search code examples
visual-studiounity-game-enginehololens

Cannot deploy .sln to Hololens 2


What I have done

I looked up a few tutorials and did all their steps. MRTK is successfully installed. I created a simple world in Unity 3D (latest version), with 2 moveable (using the hand interface) objects. In game mode, everything works fine.

Now I wanted to deploy it to my Hololens 2. So I build the project with the following settings:

Settings Image 1

Settings Image 2

After that I connected my Hololense to the PC and want to deploy it via Visual Studio 2022. It is set to "Release" "ARM 64" "Device".

After pressing on "start without debugging" i will get the following error Codes (as an image because it is better structured):

Error Code Image 1

Error Code Image 2

error Code Image 3

I already tried installing different SDK packages and creating 5 new Unity projects but it doesnt work. Hope you can help me!

Greetings!


Solution

  • Apart from the suggestions from derHugo, you may also check the following configurations of your project.

    • Make sure Unity is 2020.3 LTS, and you have used Mixed Reality Feature tools to import/update to the latest package.
    • Select a specific “Target SDK Version” and “Visual Studio Version” instead of “Latest installed”
    • In visual studio, make sure the Platform Toolset consists with Unity selection (v143 for vs 2022)
    • Reinstall “Universal Windows Platform development” component in VS installer and ensure any related to v143 ARM64 build tools are installed (because you are using vs 2022)

    LNK1136 error is caused by corrupt or invalid files. Because to deploy a unity project to HoloLens, you need to build a Unity project first. If cleaning VS build then rebuilding is not working, try to remove Unity build then rebuild.

    VS installer Screenshot added:

    enter image description here