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.

Suddenly getting errors when trying to launch Hololens Emulator

edited August 2016 in Questions And Answers

Hello!

I was going thru the Microsoft Origami tutorial, and everything was going very well. I updated Visual Studio from Update 2 to Update 3, and now I can't launch the emulator. I get the following errors:

Severity Code Description Project File Line Suppression State
Error Could not copy the file "C:\Users\ahn20.nuget\packages\Microsoft.ApplicationInsights.WindowsApps\1.0.0\lib\win81\Microsoft.ApplicationInsights.Extensibility.Windows.dll" because it was not found. Origami
Severity Code Description Project File Line Suppression State
Error Could not copy the file "C:\Users\ahn20.nuget\packages\Microsoft.ApplicationInsights\1.0.0\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.dll" because it was not found. Origami

Severity Code Description Project File Line Suppression State
Error Could not copy the file "C:\Users\ahn20.nuget\packages\Microsoft.ApplicationInsights.PersistenceChannel\1.0.0\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.PersistenceChannel.dll" because it was not found. Origami

I've gone into Nuget and I have these packages installed:
Microsoft.ApplicationInsights
Microsoft.ApplicationInsights.PersistenceChannel
Microsoft.ApplicationInsights.WindowsApps
Microsoft.NETCore.UniversalWindowsPlatform
WaveEngine.HoloLens

Anything I should try? Or perhaps someone could be kind enough to share a OneDrive link with those missing DLL's?

Thanks for any ideas!!

Tagged:

Answers

  • Something similar happened to me. First time I installed everything VS2015 w/update 3, Unity3D 5.4,0f1 HTP went through first Instr. Origami, everything OK. Start second part adding script and from that point I keep getting "Hololens could not be loaded.." when I run in Unity and "Unable to find plugins folder WSAPplayer ..." after building. Keep me posted..please.

  • @Unity3D_Coder not sure if it will help with this particular scenario or not, but there have been multiple Patches for Update 3 released since Update 3 came out. You might want to install them incase they fix something that Update 3 may have broke.

    Matter of fact I just installed another one this morning. They should appear in your Visual Studio Notifications

    HTH

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • edited August 2016

    Thanks for your ideas! Really strange, but I haven't gotten any notifications at all. I did find a patch and installed it, but that didn't help. I reinstalled Visual Studio but nothing changed. Finally, I noticed that for example, I get this error:

    Severity Code Description Project File Line Suppression State
    Error Could not copy the file "C:\Users\ahn20.nuget\packages\Microsoft.ApplicationInsights.PersistenceChannel\1.0.0\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.PersistenceChannel.dll" because it was not found. Origami

    However it occurs regardless of whether or not I have Microsoft.ApplicationInsights.PersistenchChannel installed or not. Digging deeper, this baffles me.

    Take this error:

    Severity Code Description Project File Line Suppression State
    Error Could not copy the file "C:\Users\ahn20.nuget\packages\Microsoft.ApplicationInsights\1.0.0\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.dll" because it was not found. Origami

    Why is VS trying to use version 1.0.0 when the latest is 2.1.0? When I try to install 1.0.0 nothing happens. Also, when installing Nuget packages, should I use the very latest beta version or the latest non-beta version?

    Basically, I think I've narrowed this down to Visual Studio trying to use completely obsolete packages that I can't even install, and for some reason not sending me notifications for updates.

    Thank you so much for your ideas and help. I am a not as good in Visual Studio as in Unity3D, but I'm up to try anything to get this to work.

    @HoloSheep said:
    @Unity3D_Coder not sure if it will help with this particular scenario or not, but there have been multiple Patches for Update 3 released since Update 3 came out. You might want to install them incase they fix something that Update 3 may have broke.

    Matter of fact I just installed another one this morning. They should appear in your Visual Studio Notifications

    HTH

  • Have you tried restarting the Hololens emulator, or even reinstalling the hololens emulator? The Origami tutorial doesn't even use nuget packages so I'm confused what nuget has to do with it working or not...

  • @Unity3D_Coder one other shot in the dark is you may want to check your target versions in Visual Studio as described here.

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • I checked and this is what I have:

    Quite different than what is shown in your link.

    @HoloSheep said:
    @Unity3D_Coder one other shot in the dark is you may want to check your target versions in Visual Studio as described here.

  • @Unity3D_Coder do you have Build 10586 available as an option in your Target version dropdown? If so, I would suggest selecting that and giving it a try.

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • Yes, I do have that in my min version dropdown.

    Taking @PoshPorcupine advice, I uninstalled the Hololens Emulator. Then I went a step further and uninstalled Visual Studio. Then I reinstalled VS with the Tools and SDK described here: https://developer.microsoft.com/en-us/windows/holographic/install_the_tools

    Now I can't even make a build in Unity because of this:

    Could not start compilationException: 'C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade\Windows.winmd' not found, do you have Windows UAP SDK installed?
    UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.FillNETCoreCompilerOptions (WSASDK wsaSDK, System.Collections.Generic.List`1 arguments, System.String& argsPrefix) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MicrosoftCSharpCompiler.cs:195)
    UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.StartCompiler () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MicrosoftCSharpCompiler.cs:314)
    UnityEditor.Scripting.Compilers.ScriptCompilerBase.BeginCompiling () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/ScriptCompilerBase.cs:47)
    UnityEditor.HostView:OnGUI()

    So if anything I've back tracked today because now even Unity doesn't work :(

    When trying to run a build in VS, I get only 2 errors:

    Severity Code Description Project File Line Suppression State
    Error CS0012 The type 'CoreApplicationView' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'. Origami C:\Users\ahn20\Documents\HolographicAcademy-Holograms-101\Origami\WithSpatialMapping\Origami\App.cs 33 Active

    Severity Code Description Project File Line Suppression State
    Error CS0012 The type 'CoreWindow' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null, ContentType=WindowsRuntime'. Origami C:\Users\ahn20\Documents\HolographicAcademy-Holograms-101\Origami\WithSpatialMapping\Origami\App.cs 64 Active

    So now I have both Unity and VS broken :(

    @HoloSheep said:
    @Unity3D_Coder do you have Build 10586 available as an option in your Target version dropdown? If so, I would suggest selecting that and giving it a try.

  • @Unity3D_Coder good work! :smiley:

    So, Visual Studio has a UAP SDK feature that you may need to add from the Install/Modify screen:

    Also if run the latest Unity Download Assistant from this page.
    I think it will install (or maybe repair) both the latest HTP and the related UWP runtime for Unity.

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • Currently this is what I have set up:

    I'll go ahead to the Unity Download Assistant now.

    Thanks for helping, you've spent too much time on me :(

    @HoloSheep said:
    @Unity3D_Coder good work! :smiley:

    So, Visual Studio has a UAP SDK feature that you may need to add from the Install/Modify screen:


    Also if run the latest Unity Download Assistant from this page.
    I think it will install (or maybe repair) both the latest HTP and the related UWP runtime for Unity.

  • @Unity3D_Coder I would suggest adding (currently uncheck in your screen above)

    Windows 10 SDK (10.0.10240)

    and then setting that as the Min Version and setting the 10.0.10586 as your target version on the Project Settings Application screen:

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • So I can't set the Target version for some reason:

    I've installed this in VS:

    What's so strange is that I have checked the box to install the Windows 10 SDK 10.0.10240 but after installing, I go back into the VS installed and it is unchecked again.

    After using the Unity download assistant, I still have the same console error:

    Could not start compilationException: 'C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade\Windows.winmd' not found, do you have Windows UAP SDK installed?
    UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.FillNETCoreCompilerOptions (WSASDK wsaSDK, System.Collections.Generic.List`1 arguments, System.String& argsPrefix) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MicrosoftCSharpCompiler.cs:195)
    UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.StartCompiler () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MicrosoftCSharpCompiler.cs:314)
    UnityEditor.Scripting.Compilers.ScriptCompilerBase.BeginCompiling () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/ScriptCompilerBase.cs:47)
    UnityEditor.HostView:OnGUI()

    If this isn't strange, I don't know what is.

    @HoloSheep said:
    @Unity3D_Coder I would suggest adding (currently uncheck in your screen above)

    Windows 10 SDK (10.0.10240)

    and then setting that as the Min Version and setting the 10.0.10586 as your target version on the Project Settings Application screen:

  • edited August 2016

    So first I went into Programs and Features, pressed Visual Studio > Change > Repair. Then I went into Unity and finally fixed this Unity error:

    Could not start compilationException: 'C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade\Windows.winmd' not found, do you have Windows UAP SDK installed?
    UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.FillNETCoreCompilerOptions (WSASDK wsaSDK, System.Collections.Generic.List`1 arguments, System.String& argsPrefix) (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MicrosoftCSharpCompiler.cs:195)
    UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.StartCompiler () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MicrosoftCSharpCompiler.cs:314)
    UnityEditor.Scripting.Compilers.ScriptCompilerBase.BeginCompiling () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/ScriptCompilerBase.cs:47)
    UnityEditor.HostView:OnGUI()

    **Notice it says: 'C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade\Windows.winmd

    But my Windows.winmd was at:
    'C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Windows.winmd**

    So just create a Facade folder and copy that Windows.winmd file. After doing this it took Unity a few minutes to build. After that it builds normally (about 45 seconds). Such a hard problem with such an easy solution!

    However, I was shown this very, very ugly sight when running the project in Visual Studio:

    So 1 error fixed and 33 created :)

  • edited August 2016

    What's confusing me the most is this:

    WHY on the right it is showing Windows 8.1? I've build with Universal 10 so I have no idea why the Solution Explorer is showing Windows 8.1...

  • Finally, I've come to this:

    However I don't know where to find the duplicates :(

  • @Unity3D_Coder if you are still using the same version of the solution that you have run previous builds under Unity, you may want to try deleting the UWP solution files and folders that get regenerated by unity each time you build:

    (note the screenshot has a different project name "planetarium" than "origami" but the same files should exist for "origami")
    You can and probably should in your case also kill the "Library" folder as well and rebuild from Unity which will create new copies of those files and folders for you.

    As a matter of fact with the various things you have changed and upgraded, I would recommend stepping back and where possible and practical starting clean. For example, I would suggest that if deleting and regenerating doesn't clean it up that you delete the origami project folder and download a fresh copy and step through it again from a clean start double checking each step along the way.

    Typically, with many or most of the build and deploy issues reported so far it ends up that a step has been missed or done incorrectly, which considering how many interconnected parts there are with the beta version of the tools is pretty understandable.

    The one potentially significant difference with your environment that might be a factor is that you have the 14393 Anniversary build of Windows and the related libraries. Were you ever able to get your Target version set to 10586?

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

  • I finally got the target version to 10586. However I'm still getting these errors:

    If I can't find a fix in a few day's I'll probably just delete my Programs (x86) folder and hope that helps.

    @HoloSheep said:
    @Unity3D_Coder if you are still using the same version of the solution that you have run previous builds under Unity, you may want to try deleting the UWP solution files and folders that get regenerated by unity each time you build:

    (note the screenshot has a different project name "planetarium" than "origami" but the same files should exist for "origami")
    You can and probably should in your case also kill the "Library" folder as well and rebuild from Unity which will create new copies of those files and folders for you.

    As a matter of fact with the various things you have changed and upgraded, I would recommend stepping back and where possible and practical starting clean. For example, I would suggest that if deleting and regenerating doesn't clean it up that you delete the origami project folder and download a fresh copy and step through it again from a clean start double checking each step along the way.

    Typically, with many or most of the build and deploy issues reported so far it ends up that a step has been missed or done incorrectly, which considering how many interconnected parts there are with the beta version of the tools is pretty understandable.

    The one potentially significant difference with your environment that might be a factor is that you have the 14393 Anniversary build of Windows and the related libraries. Were you ever able to get your Target version set to 10586?

  • @Unity3D_Coder said:
    Finally, I've come to this:

    However I don't know where to find the duplicates :(

    Your package list file in Visual Studio has become corrupt, you have duplicate referencing to the core libraries namely 10586 and 14393 and possibly 10240.
    I removed all my old libraries before installing new libraries so I not sure how you solve problem.
    Don't delete program files (x86) folder it part of windows 10
    Uninstall Unity and Emulator and reinstall the latest from https://developer.microsoft.com/en-us/windows/holographic/install_the_tools

Sign In or Register to comment.