[MRTK 2017.4.1.0] Can't build project using Build Window
Overview
Hi Dev's, I'm having issues to build my project using the Build Window. I tried out a lot with different versions of Unity already, however no success.
Expected Behavior
You click 'Build all, then Install' and your App gets successfully deployed on your HoloLens. Or in the Deploy options after clicking Install it deploys.
Actual Behavior
Different, depending on the Unity version I used (see below). Usually, I could build the app but then can't bring it to the HoloLens through the 'Install' button. On 2018.2.5 however, I can't even connect to the HoloLens
Steps to reproduce
Open new project -> Import MRTK -> Try to build
Unity Editor Version
Tried with 2017LTS 2018.1.9 2018.2.5
All three not working
Mixed Reality Toolkit Release Version
[MRTK 2017.4.1.0]
Help
Could you guys tell me your workflow for building HoloLens apps using the Build Window (saving a ton of time compared to 'the old way') and ideally using a relatively new Unity version?
What kinds of errors are you running into?
When using unity 2018.1.9 I'm getting the following error when trying to install it on the Holo:
Network Error: Request timeout

So it's building okay, just having issues deploying? How big is the appx package you've built?
You can change the default timeout.
The app was around 50mb. It's just a cube moved on the z axis.
I also had the error that the package was not found and when i then installed the appx package directly through the device portal it could deploy to the holo. But then it was stuck immediately after opening the app in the HoloLens.
I also got different errors depending if the scripting backend was set to .Net or IL2CPP. I'm not quite sure which to choose, since the MRTK sets it to .Net but Unity suggest you to use IL2CPP, becuase .Net is deprecated in Unity2018.2.X
Make sure whenever you switch from .net to il2cpp you delete your build folder.
il2cpp is the way to go.
Also make sure that any prev builds are uninstalled form the HL. If you're still having problems try opening the VS Project in the build folder and try deploying from VS.
Okay, deleted my build folder, getting a different error now. (see screenshot) Also switched to IL2CPP and uninstalled the app from the Holo
Will try to deploy it from VS direclty, however i'd love to use the build window, since it saves a ton of time.

Thanks so far already
If I uncheck 'Use SSL' i'm getting the following error: 'Network Error: Generic /unknown HTTP error' 'Failed to install [appname] on [HoloName]'
Did you enable the Unity Editor in your firewall settings?
Enabled the Unity Editor in my firewall. No success, unfortunately. Getting the same errors again. However, I could at least deploy my project through VS.
Okay, I got it working when switching from IL2CPP to .NET which will is deprecated but still working. Unfortunately, I couldn't even build from VS when using IL2CPP. Maybe the workflow is different than with .NET. The way I usually do it is to create an APPx package in VS and then install it from the Windows Device Portal. Works relatively fast. Has anyone managed to deploy using IL2CPP and the BuildWindow? If so, please let me/us know how :)
I managed to get IL2CPP running and deployable via BuildWindow. While connecting to the Hololens the WebRequest fails due to self-signed certificates.
To deploy via the BuildWindow it's necessary to pass a custom certificate handler to the WebRequest and ignore the certificate validation. The following methods are affected:
- WebRequestGet
- WebRequestDelete
- WebRequestPost
The code is trivial:
// Add this before sending the WebRequest.
webRequest.certificateHandler = new CustomCertificateHandler();
// Override the validation in a custom certificate handler.
public class CustomCertificateHandler : CertificateHandler {
protected override bool ValidateCertificate(byte[] certificateData) {
return true;
}
}
Seems like you are unblocked. Bulk closing older HTK bug. Please reopen if you can repro this issue in MRTK v2. Thanks! Yoyo