Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

APPs will not deploy to HoloLens.

My computer seems to connect to the HoloLens OK either with USB or WiFI. Virtual keyboard works. The camera works, showing the preview on the computer screen as I move my head..

But each time I try to deploy an App (UWP version of HelloWorld) to the HoloLens the deploy fails. I think I am following all the instructions. I think all the software is current. (The Unity demos also play on the Surface Pro 3 but have errors when I try to send them to the HoloLens.)

Answers

  • Options

    What are the errors in the output window when deploying to the HoloLens. Most of us are happy to help troubleshoot, but we definitely need more info to do so.

  • Options

    Alas. It is not giving much useful information I can find.

    Deploying to LOCAL MACHINE it says DEPLOY SUCCESSFUL, and it runs. Deploying to the HoloLens (DEVICE or REMOTE) it seems to compile then just says DEPLOY FAILED. A popup window says the same and then just adds: must deploy in build first; which gives the same result. I'm not sure where to get more info. I am guessing I have the wrong version of something or missing some step, but I've tried lots of variations with the same result and no other useful info that I can find, so far.

  • Options

    Hey @qporit,
    Have you enabled developer mode on your HoloLens? Follow the instructions here to set this up.

  • Options

    I did enable developer mode. I also was able to communicate in both directions to the HoloLens -- I can send text to the HoloLens with a virtual keyboard. I can monitor the HoloLens on the paired computer, (both with USB & WiFi connection) and I can watch the HoloLens camera on the computer.

    The "only" thing I can not do is send an App to the HoloLens. I will try again tomorrow and log each step and try to get the version number of any software I use.

  • Options

    I can also successfully download an App from the store and run it.

  • Options

    How do you send text with hololens?

  • Options

    Hi @qporit,
    Have you tried building/deploying any of the Academy tutorials? You might just be missing a build setting, which the tutorials can help you identify.

    Here is the most basic tutorial to start with: https://developer.microsoft.com/en-us/windows/holographic/holograms_100

    The more advanced tutorials all have a 'Completed' folder that you can load the completed project from, set the correct build settings in Unity and VS, and then deploy to your device.

    In Visual Studio, make sure that you have altered the following build options:
    Change Debug to Release
    Change ARM to x86
    Change Local Machine to Remote Machine (enter HoloLens IPAddress)
    OR change Local Machine to Device (your HoloLens must be connected via USB)
    You should then try building/deploying with 'Debug > Start without debugging'

  • Options

    I tried again to use Unity using https://developer.microsoft.com/en-us/windows/holographic/holograms_100. Windows 10 was updated. I installed the latest Unity: UNITY 5.4.0b16-HTP.

    I tried it with the analytics setting ON and OFF. With the setting ON I get an error immediately. With OFF I run with no errors until the step looking at Package.appxmanifest.

    Ignoring that error and continuing to try to deploy, I get a failure to deploy.

    Here is a detailed log, with error messages plus version info for Visual Studio.

    LOG:

    1- INSTALLED UNITY 5.4.0b16-HTP & RUNTIME

    2- CREATE C:\ER\H\T5
    (NO ASSET PACKAGES AVAILABLE TO LOAD)
    UNITY ANALYTICS OFF
    NO ERROR MESSAGES

    3- SET CAMERA - NO ERROR MESSAGES

    4- ADDED CUBE - NO ERROR MESSAGES

    5- SAVED SCENE - NO ERROR MESSAGES

    6- SET STORE QUALITY TO FASTEST - NO ERROR MESSAGES
    NOTE: NEED TO CLICK ON DEFAULT TO SET FASTEST CHECK TO GREEN

    7- BUILD SETTING SET - NO ERROR MESSAGES
    NOTE: STILL SAYS BUILD AND RUN ON LOCAL MACHINE
    NOTE: HAVE NOT YET SAVED PROJECT

    8- VIRTUAL REALITY SUPPORTED CHECKED - NO ERROR MESSAGES

    9- SCENE ADDED C# CHECKED - NO ERROR MESSAGES

    10- BUILT TO APP FOLDER - NO ERROR MESSAGES

    11- OPENED T5.SLN - NO ERROR MESSAGES
    VISUAL STUDIO/SOLUTION EXPLORE/T5 (UNIVERSAL WINDOWS)

    12- RIGHT CLICKED ON Package.appxmanifest in the Solution Explorer and selected View Code
    ERROR MESSAGE:
    Unable to load one or more of the requested types.
    Retreive the LoaderExeptions property for more information

    Package.appxmanifest FILE PROPERTIES
    shows Custom Tool and Custom Tool Namespace blank. Other items Build Action = AppxManifest and the correct File Name and Path.

    CHECKED AssemblyInfo.cs
    [assembly: AssemblyTitle("T5")]
    [assembly: AssemblyDescription("")]
    [assembly: AssemblyConfiguration("")]
    [assembly: AssemblyCompany("DefaultCompany")]
    [assembly: AssemblyProduct("T5")]
    [assembly: AssemblyCopyright("Copyright © DefaultCompany 2015")]
    [assembly: AssemblyTrademark("")]
    [assembly: AssemblyCulture("")]

    ERROR MESSAGE FOUND ON UNITY
    DirectoryNotFoundException: Could not find a part of the path "C:\ER\H\T5\Library\UnityAssemblies\version.txt".
    System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:292)
    System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
    (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
    System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamWriter.cs:124)
    System.IO.StreamWriter..ctor (System.String path, Boolean append)
    (wrapper remoting-invoke-with-check) System.IO.StreamWriter:.ctor (string,bool)
    System.IO.File.CreateText (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:159)
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilesGenerator.CreateVersionFile (System.String[] assemblies)
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilesGenerator.DeployUnityAssemblies (SyntaxTree.VisualStudio.Unity.Bridge.ProjectSystem.UnitySolution solution)
    SyntaxTree.VisualStudio.Unity.Bridge.ProjectFilesGenerator.GenerateProject ()
    UnityEditor.EditorUserBuildSettings.Internal_ActiveBuildTargetChanged () (at C:/buildslave/unity/build/artifacts/generated/common/editor/InternalUtilityBindings.gen.cs:567)


    CONTINUING... (Ignoring the error and continuing)

    13- SET THE IP ADDRESS GIVEN BY CORTANA

    14- START WITHOUT DEBUGGING

    ERROR MESSAGE:
    The project T5 needs to be deployed before it can be started

    Verify the project is selected to be deployed in the Solution Configuration Manager
    or deploy it explicitly by clicking one of the Deploy commands in the Build Menu

    NOTE: Solution Configuration Manager shows deploy is selected. Clicking on the Deploy options in the BUILD menu do not deploy either.


    WITH ANALYTICS ON THE ERROR MESSAGE APPEARS AS SOON AS UNITY STARTS:

    UNDER CONSOLE:

    Similar error message, somewhat longer, but too long for this comment.

    .


    VISUAL STUDIO INFORMATION

    Microsoft Visual Studio Community 2015
    Version 14.0.25123.00 Update 2
    Microsoft .NET Framework
    Version 4.6.01038

    Installed Version: Community

    Visual Basic 2015 00322-20000-00000-AA168
    Microsoft Visual Basic 2015

    Visual C# 2015 00322-20000-00000-AA168
    Microsoft Visual C# 2015

    Visual C++ 2015 00322-20000-00000-AA168
    Microsoft Visual C++ 2015

    Windows Phone SDK 8.0 - ENU 00322-20000-00000-AA168
    Windows Phone SDK 8.0 - ENU

    Application Insights Tools for Visual Studio Package 5.2.60328.3
    Application Insights Tools for Visual Studio

    Common Azure Tools 1.7
    Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

    GitHub.VisualStudio 1.0
    A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

    JavaScript Language Service 2.0
    JavaScript Language Service

    JavaScript Project System 2.0
    JavaScript Project System

    Microsoft Azure Mobile Services Tools 1.4
    Microsoft Azure Mobile Services Tools

    NuGet Package Manager 3.4.3
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

    PreEmptive Analytics Visualizer 1.2
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

    Python Tools for Visual Studio 2.2.40315.00
    Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

    Python Tools for Visual Studio - Django Integration 2.2.40315.00
    Provides templates and integration for the Django web framework.

    Python Tools for Visual Studio - Profiling Support 2.2.40315.00
    Profiling support for Python projects.

    SQL Server Data Tools 14.0.60311.1
    Microsoft SQL Server Data Tools

    TypeScript 1.8.31.0
    TypeScript tools for Visual Studio

    Visual Studio Tools for Unity 2.1.0.0
    Visual Studio Tools for Unity

    Visual Studio Tools for Universal Windows Apps 14.0.25219.00
    The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

  • Options

    Hi @qporit,
    Double-check that your Unity build settings look like this:

    Do you have a screenshot for the error you reported with 7 (where does it say 'Build and run on local machine')?

    Before you will be able to successfully deploy to a device, you will need to pair it to your PC. Follow the steps for pairing your device when building/deploying in VS. This is separate from pairing your device to the Windows Developer Portal.

    The error that you get on 12 is concerning, especially if you have the correct build settings (as shown above). This indicates that something with your configuration is incorrect. At this point, I would suggest uninstalling the tools and then re-installing Unity, UWP Runtime, and VS again for a fresh start. Here's the link with where to find the latest tools.

  • Options

    Thanks for the suggestions. I'll try them all!

    Quick note. You already sent the screenshot reported with 7 (where does it say 'Build and run on local machine') It is the item right under UWB BUILD TYPE ... D3D

  • Options

    Ah, thanks! It won't actually build and run on the local machine because you're going to build and run from VS, so that option doesn't matter. We just use Unity for exporting the project and building a UWP solution for VS :)

    I hope your system will work soon!

  • Options
    mavashermavasher ✭✭
    edited May 2016

    Sorry to jump in here. I've done all the steps in the Documentation. Unity 5.4.0b16 . VS update 2.

    I'm having similar errors when I Start without Debug. On Release, x86 and the Unity build settings as you posted in the above image.

    Error 1:
    Severity Code Description Project File Line Suppression State
    Error The command ""C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\App\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.dll" -pdb -verbose -unity-engine="C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\App\Origami\Unprocessed\UnityEngine.dll" -unity-networking=C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\App\Origami\Unprocessed\UnityEngine.Networking.dll "C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\UWP\Assembly-CSharp-firstpass\obj\x86\Release\x86\Release"" exited with code 1. Assembly-CSharp-firstpass C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\UWP\Assembly-CSharp-firstpass\Assembly-CSharp-firstpass.csproj 176

    Error 2:
    Severity Code Description Project File Line Suppression State
    Error Metadata file 'C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found Assembly-CSharp C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\UWP\Assembly-CSharp\CSC

    Error 3:

    Severity Code Description Project File Line Suppression State
    Error Metadata file 'C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found Origami C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\App\Origami\CSC

    Error 4:

    Severity Code Description Project File Line Suppression State
    Error Metadata file 'C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll' could not be found Origami C:\Users*******\Desktop\HolographicAcademy-Holograms-101\Origami\App\Origami\CSC

    Any help you have would be great. I can't get anything done.

    One step that didn't work before the errors is that when I go to Debug | Start without Debugging the documentation says that I will need to enter my PIN number. I have the PIN from the Hololens but no request from VS for the PIN number. My device is currently connected to the PC via USB and Developer Mode on the Hololens is active.

  • Options

    tacroy (https://forums.hololens.com/discussion/742/cant-deploy-from-vs#latest) said he "needed to remove all version of the SDK and install only the 10586 version." I am not sure exactly what he meant. If someone gets that to work I'd appreciate some more detail.

    Meanwhile I reinstalled everything as suggested above. Now, with ENABLE UNITY ANALYTICS on or off:

    Everything worked until the build to VS finished which gave the two error messages:

    ERROR 1
    DirectoryNotFoundException: Could not find a part of the path "C:\Program Files (x86)\Windows Kits\10\Platforms\UAP\10.0.10586.0\Platform.xml".
    System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:292)
    System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
    (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
    System.Xml.XmlUrlResolver.GetEntity (System.Uri absoluteUri, System.String role, System.Type ofObjectToReturn)
    Mono.Xml2.XmlTextReader.GetStreamFromUrl (System.String url, System.String& absoluteUriString)
    Mono.Xml2.XmlTextReader..ctor (Boolean dummy, System.Xml.XmlResolver resolver, System.String url, XmlNodeType fragType, System.Xml.XmlParserContext context)
    System.Xml.XmlTextReader..ctor (Boolean dummy, System.Xml.XmlResolver resolver, System.String url, XmlNodeType fragType, System.Xml.XmlParserContext context)
    System.Xml.XmlReader.Create (System.String url, System.Xml.XmlReaderSettings settings, System.Xml.XmlParserContext context)
    System.Xml.XmlReader.Create (System.String url, System.Xml.XmlReaderSettings settings)
    System.Xml.Linq.XDocument.Load (System.String uri, LoadOptions options)
    System.Xml.Linq.XDocument.Load (System.String uri)
    UnityEditor.Scripting.Compilers.UWPReferences.GetPlatform (System.String folder, System.String version) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/UWPReferences.cs:85)
    UnityEditor.Scripting.Compilers.UWPReferences.GetReferences () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/UWPReferences.cs:59)
    UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.GetAdditionalReferences (WSASDK wsaSDK) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MicrosoftCSharpCompiler.cs:375)
    PostProcessUAP.GetAdditionalReferenceAssembliesDirectories () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUAP.cs:50)
    PostProcessWinRT.RunSerializationWeaver () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:438)
    PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:123)
    UnityEditor.Metro.BuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:130)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:176)
    UnityEditor.HostView:OnGUI()

    ERROR 2
    Error building Player: DirectoryNotFoundException: Could not find a part of the path "C:\Program Files (x86)\Windows Kits\10\Platforms\UAP\10.0.10586.0\Platform.xml".

  • Options

    @Fireman said:
    How do you send text with hololens?

    1- Connect to the HoloLens as described in
    https://developer.microsoft.com/en-us/windows/holographic/using_the_windows_device_portal

    You will get to the App Manager.

    2- On the left side select the last item, Virtual Input.

    This will send keyboard entries from your computer to a field on the HoloLens, (such as a password entry) that accepts text.

    Although I have not tried it, the HoloLens should also be able to connect via Bluetooth to a Bluetooth keyboard.

  • Options

    @qporit, got it. Thanks

  • Options

    I am making progress.

    I uninstalled Windows 10 and Visual Studio.
    I reinstalled Windows 10 and Visual Studio.
    I repeated the last two steps.
    I reinstalled the latest (?) updates for Visual Studio.
    I created the HoloLens template in Visual Studio.
    I used DEBUG rather than START WITHOUT DEBEGGING and it asked for the pairing. I paired.
    A colorful cube appeared on my HoloLens. (!!!)
    There were some error messages but I ignored them. Something worked!

    Then

    I started Unity and did the 100 tutorial. I got some errors that I have seen before which disappear when you do the same thing again.
    I did the 100 tutorial again. I did not get those other errors but then got the usual will not deploy errors.
    I did it again. and again.
    And eventually the little cube appeared on my HoloLens. (!!!)

    In between, two hardware issues complicated the process. First, the USB connects on the bottom of the HoloLens arm and so it keeps falling out. Second, the HoloLens focuses with my distance glasses but not with my reading/computer glasses; but my computer focuses with my computer glasses not with my distance glasses; so I have to keep switching, and that is very awkward (and also helps dislodge the USB).

    I will now try to find a systematic process that deploys the App to the HoloLens efficiently.

  • Options

    @qporit,

    HoloLens applications can be deployed wirelessly as well as with the USB cable.

    In Visual Studio, you can select Remote Machine and enter the IP Address of your HoloLens. Be sure to set the Authentication Mode to "Universal (Unencrypted Protocol)".

    Thanks!
    David

  • Options

    @DavidKlineMS said:
    @qporit,

    HoloLens applications can be deployed wirelessly as well as with the USB cable.

    In Visual Studio, you can select Remote Machine and enter the IP Address of your HoloLens. Be sure to set the Authentication Mode to "Universal (Unencrypted Protocol)".

    Thanks!
    David

    This assumes that both machines are on the same network. My computer is on my work network, and my HoloLens on a different network because the options needed to connect to my work network are not supported yet. I don't know that the original poster has the same issues, but I just wanted to point out that some of us are tied to just a single way to deploy.

  • Options

    @Jesse_McCulloch,

    Excellent point, Jesse.

    Thanks!
    David

  • Options
    edited May 2016

    Im having the same issue, I've done everything short of reinstalling windows, I just installed windows fresh after formatting the drive. I had everything working perfect with win 8.1 but now it will not deploy to the device, even over usb. It compiles but fails to deploy. I didn't have any of these problems setting it up on windows 8.1.

    I can access the device from the browser on my pc.

    Followed the steps in the 100 tutorial and it simply won't deploy.

    Right now I uninstalled VS and am re-installing. I installed 2 versions of Unity for hololens, 16 and 14 with uwp for both versions, etc. The project builds fine, it's the deploying that won't work.

    About ready to go back to windows 8.1, I even had opencv running on hololens the other day. Now completely I'm stuck and have the seattle hackathon coming up at the end of the week.

  • Options

    @LeefromSeattle, based on your post here, you have resolved your issue. Correct?

    Thanks!
    David

  • Options

    Yes, everything is working smoothly now

  • Options

    Based on what I read in this thread ("Worked before upgrading windows 10") I am wondering if the real origin of the "will not deploy" problem is that the pairing was done before VS. And all the reinstalling was really to unpair the devices completely. ("Completely" meaning the pairing was "hidden" since the page read 0 pairs.) So the device must never be paired until VS asks for the pairing.

    Is this correct?

  • Options

    @qporit,

    I do not believe the pairing of the HoloLens prior to Visual Studio's request is related to this thread. I have my HoloLens paired to multiple PCs and for all but the first, my HoloLens was paired prior to Visual Studio's prompting.

    Thanks!
    David

Sign In or Register to comment.