# How to build your project for HoloLens?

* In the Unity menu, select **File** > **Build Settings...** to open the Build Settings window.

![Build settings.](/files/-M3il9zJ03RfHUCH_7nE)

* &#x20;In the Build Settings window, select **Universal Windows Platform** and click the **Switch Platform** button.

![Switch platform to Windows Universal Platform.](/files/-M3ilRLDChkQLxoCpl_J)

* &#x20;Click on **Project Settings** in the **Build Settings window** or the **Unity menu**, select **Edit** > **Project Settings...** to open the Project Settings window.

![Project settings.](/files/-M3im27i4-NLEUo9GAuj)

* In the Project Settings window, select **Player** > **XR Settings** to expand the XR Settings.

![ Player XR settings.](/files/-M3imFBkxoaNrefKG8k2)

* &#x20;In the XR Settings, check the **Virtual Reality Supported** checkbox to enable virtual reality, then click the **+** icon and select **Windows Mixed Reality** to add the Windows Mixed Reality SDK.

![XR settings Mixed Reality Supported checkbox.](/files/-M3imhm5B8x8eUwx_Xyf)

{% hint style="info" %}
Your projects settings might have been configured by Mixed Reality Toolkit.
{% endhint %}

* Optimize the XR Settings as follows:
  * Set Windows Mixed Reality **Depth Format** to **16-bit depth.**
  * Check the Windows Mixed Reality **Enable Depth Sharing** checkbox.
  * Set Stereo **Rendering Mode\*** to **Single Pass Instanced.**

![Optimization settings for XR.](/files/-M3inUHEUHR2-PrtMToa)

* &#x20;In the Project Settings window, select **Player** > **Publishing Settings** to expand the Publishing Settings. Scroll down to the **Capabilities** section and check the **SpatialPerception** checkbox.

![Spatial Perception enabled.](/files/-M3inuDVZOPqwLt7fIsR)

Save your project and open up the Build Settings. Click on Build button, not Build and Run. When prompted, create a new folder(ex:HoloLensBuild) and select your new folder to build your files into.

{% hint style="danger" %}
Click on Build button, not Build and Run.
{% endhint %}

![Build your project into a new folder by clicking build button. ](/files/-M3ioedvaqXI6uPm5kHY)

When your build is done, your file explorer will automatically open to the build folder you just created.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.xrdev.app/mixed-reality-docs/lessons/lesson1/project/how-to-build-your-project-for-hololens.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
