How to pair HoloLens with Visual Studio
Pairing HoloLens with Visual Studio is the process of establishing a trusted connection between your device and your PC so you can deploy and debug applications wirelessly over Wi-Fi using a PIN. This pairing lets you iterate on mixed reality apps without plugging in a USB cable, sending builds straight from Visual Studio to your HoloLens for immediate testing.
Prerequisites for pairing
Before you can pair HoloLens with Visual Studio, you need three things in place. You need a HoloLens device (either the original or HoloLens 2) that is charged and turned on. You need a Windows 10 PC with Visual Studio installed, including the Universal Windows Platform (UWP) development workload. Finally, both the HoloLens and the PC must be connected to the same Wi-Fi network, because the pairing and deployment happen over that network rather than through a cable. If you are still evaluating hardware, the HoloLens development kit includes the specialized sensors and APIs you will be targeting.
Make sure Visual Studio is up to date, and if you are using Unity, confirm that your project is set up for HoloLens development with the Mixed Reality Toolkit or the appropriate UWP export settings. These prerequisites ensure that the connection process runs smoothly and that your build targets the correct device architecture.
Enable Developer Mode on your HoloLens
To deploy apps from Visual Studio, your HoloLens must have Developer Mode turned on. This setting allows the device to accept unsigned applications and remote debugging connections from your PC.
- Put on your HoloLens and perform the bloom gesture (spread your fingers open from a closed fist) to open the main menu.
- Select the Settings tile from the menu.
- Navigate to Update & Security (or simply Update on some versions).
- Select For developers.
- Toggle Use developer features to On. A warning may appear; confirm that you understand the security implications.
- If your HoloLens runs Windows Holographic version 21H1 or newer, also enable Device discovery. This makes the device visible to Visual Studio for automatic detection.
- Optionally, enable Device Portal if you want to manage the device from a web browser, though this is not required for pairing with Visual Studio.
Enabling Developer Mode is the single most important step, because without it Visual Studio cannot communicate with the device at all. Once this is set, the HoloLens is ready to accept incoming connections.
Configure your project for HoloLens in Visual Studio
Open your project in Visual Studio. For Unity projects, you will typically export the project as a UWP solution first, then open that solution in Visual Studio. For native C++ or C# projects, open the project file directly.
- In the Visual Studio toolbar, set the build configuration to Release. For Unity projects, you can also use Master, but Release is the standard choice for deployment to a physical device.
- Set the solution platform to ARM64 if you are deploying to a HoloLens 2 device. For the original HoloLens, use ARM. If you are targeting the HoloLens emulator, select x86 for the first-generation emulator or x86/x64 for the HoloLens 2 emulator.
- If you see Device as a target option in the toolbar, select it. If Device is not available, you may need to change the startup project from the IL2CPP project to the UWP project in the Solution Explorer.
These settings ensure that Visual Studio compiles your code into a package that the HoloLens can run. Using the wrong architecture will cause the deployment to fail, so double-check that ARM64 is selected for HoloLens 2.
Connect Visual Studio to the HoloLens IP address
You need to tell Visual Studio where to find your HoloLens on the network. The device does not appear automatically in the device list; you must enter its IP address manually.
- On your HoloLens, go to Settings > Network & Internet > Advanced Options.
- In Visual Studio, open your project and find the debugger settings. For a C# project, a dialog should appear automatically when you select Remote Machine from the Debugger to launch dropdown. If not, open the project properties and navigate to the Debug tab.
- In the Machine Name field, enter the IP address you noted from the HoloLens. Do not rely on the Auto Detected feature, as it can pick the wrong device on a busy network.
Entering the IP manually is the most reliable way to connect, especially if you have multiple devices on the same network. Once the IP is set, Visual Studio knows exactly which HoloLens to target.
Deploy your app and complete the PIN pairing
With the IP address configured, you are ready to deploy. The first time you do this, Visual Studio will ask for a PIN to establish the trusted connection.
- In Visual Studio, press F5 or click the green Play button to build and deploy the app to the HoloLens.
- On the HoloLens, a dialog will appear in the For developers settings asking you to generate a pairing PIN. Tap Pair.
- The HoloLens will display a numeric PIN on its screen.
- In Visual Studio, type that PIN into the pairing prompt that appeared during deployment.
- After entering the PIN, tap Done on the HoloLens to dismiss the dialog.
Visual Studio will then finish deploying the app to the device. The first deployment may take a few minutes because the build system packages the application and all its dependencies. Subsequent deployments are faster because the pairing is already established.
Managing paired connections
Once you complete the PIN pairing, Visual Studio remembers the connection. You can deploy and debug on that HoloLens without entering the PIN again, as long as both devices remain on the same Wi-Fi network and the HoloLens stays in Developer Mode.
If you need to unpair the HoloLens from all paired computers, go to Settings > Update & Security > For developers on the device and select the option to clear paired devices. This removes the trusted connection for every PC that has previously paired with it. After clearing, you will need to repeat the PIN pairing process the next time you deploy from any computer.
You can also pair the same HoloLens with multiple PCs by repeating these steps for each computer. Each PC gets its own PIN entry during the first deployment, and the HoloLens keeps a list of trusted devices. If you ever switch to a new development machine, simply enable Developer Mode on the HoloLens, enter the new PC's IP address in Visual Studio, and complete the PIN pairing again.

















