Friday, 27 March, 2020 UTC


Summary

If you followed my article on Build your first HoloLens 2 Application with Unity and MRTK 2.3.0, you should be in the stage shown in Figure 1.
Figure 1
We completed the successful simulation in Unity in the last article. Now let’s deploy it to the actual device. Open the project if you have closed it. Go to File -> Build Settings… refer to Figure 2.
Figure 2
You will get the Build settings window. Click on Add Open Scenes to add your current scene and then see whether your setting is correct as in Figure 3 below and then click the Build button.
Figure 3
Select an appropriate location to save your builds and then click Select Folder. Refer to Figure 4.
Figure 4
Build might take a while depending on your computer's specifications. Be patient. Give some break to your eyes, if you are sitting standup :) Once the build has completed the build folder will open.

Trending AR VR Articles:

1. Five Augmented Reality Uses That Solve Real-Life Problems
2. Virtual Reality Headsets: What are the Options? Which is Right For You?
3. Augmented Reality Robotics
4. Infographic: The Future of Virtual Reality
It should be similar to Figure 5 below (Except for the .vs folder). However, if you see your <projectName>.sln (In my case it is MadProj.sln) file, open it with Visual Studio 2019.
Figure 5
Wait until the project is loaded and ready to use. Change the solution configurations to Release and Solution platform to ARM64. Next, if you have the device ready, make sure you connect it via USB to the computer. Then you can select ‘Device’. Refer to Figure 6. Otherwise, if you have installed the HL2 emulator you will see that option here and you can select that.
Figure 6
If you are using the device (HL2), make sure you turn on the developer features and developer portal in the device. How to do that? Refer to Figure 7 below. Follow the Gif. Also if Visual Studio might ask you to enter a PIN to pair the device. You can generate this by going to Settings — > Update & Security For developers — > Device discovery in the device and then by clicking the Pair button. You will see the PIN then.
Figure 7
Alright, you are all ready to deploy your first AppX. Go to Debug — > Start Without Debugging. Refer to Figure 8 below.
Figure 8
Again, give it some time to build the project and upload the files to the device. This time you can eat something :) After a while, you will see the success message as below in Figure 9 :D (if it is deployed without any errors). Then wear your HL2 and enjoy the project.
Figure 9
Congratulations! You have now deployed your first HoloLens 2 application, Cheers!

Don’t forget to give us your 👏 !

https://medium.com/media/1e1f2ee7654748bb938735cbca6f0fd3/href
How to build your AR Application to your HoloLens 2 was originally published in AR/VR Journey: Augmented & Virtual Reality Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.