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.

Origami sample project

In Chapter 101 of Alex's video on creating the Origami project, after doing the Buid operation at about the 3:52 point in the video, the project is not created, but instead I get the following error:

Could not start compilationException: '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:207)
UnityEditor.Scripting.Compilers.MicrosoftCSharpCompiler.StartCompiler () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/MicrosoftCSharpCompiler.cs:326)
UnityEditor.Scripting.Compilers.ScriptCompilerBase.BeginCompiling () (at C:/buildslave/unity/build/Editor/Mono/Scripting/Compilers/ScriptCompilerBase.cs:47)

I have Visual Studio 2015, Update 1 installed and it is my understanding that this includes the Windows UAP SDK. Can anyone tell me what might be wrong here?

Best Answer

«1

Answers

  • I meant Chapter 1 of Course 101E

  • Does it work with the Unity 5.4 beta?

  • I am using 5.3 Op1 Personal. It is what came with the package I have.

  • The projects run on Unity 5.1.4f1 (64-bit). The Unity run-time packages are in Completed\Assets directory of each sample .Just double click them.

    I have Unity 5.1.4f1 (64-bit), Windows 10 build 14291, Visual Studio 2015 Community Update 2 RC.

    The players runs, but still needs Unity.VR.WSA.Input assembly, which will be released with the HoloLens Emulator on 30th March 2016, hopefully?.

  • Any news on the Unity.VR.WSA namespace? I haven't seen anything new from Unity.

  • Unity has beta 5.4 from here.

    Dwight Goins
    CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
    MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
    http://dgoins.wordpress.com

  • mavashermavasher ✭✭
    edited March 2016

    @Dwight_Goins_EE_MVP said:
    Unity has beta 5.4 from here.

    Right, but I don't see any reference to the new namespace in the documentation or the release notes. I haven't downloaded 5.4b yet. Have you downloaded it and found that the namespace is now there?

    Microsoft has released the emulator but without Unity's support there isn't much to do.

  • Actually I have downloaded it, and installed it, but currently I'm working with DirectX samples to understand the core and figure out what's available and what's not.

    Dwight Goins
    CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
    MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
    http://dgoins.wordpress.com

  • james_ashleyjames_ashley ✭✭✭✭

    @mavasher said:
    Any news on the Unity.VR.WSA namespace? I haven't seen anything new from Unity.

    @mavasher,

    You can get the hololens capable version of Unity with the Unity.VR.WSA namespace here.

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • @james_ashley said:
    You can get the hololens capable version of Unity with the Unity.VR.WSA namespace here.

    Thanks James. So if we install that version of Unity and this update for Visual Studio we should be good to go for Hololens development and emulator testing?

  • MolokanMolokan
    edited April 2016

    I'm getting a couple build errors in the Origami project such as on the line "Observer.OnSurfaceChanged += Observer_OnSurfaceChanged;" where OnSurfaceChange does not exist. I also tried changing the targeted framework but the project has no traditional properties windows where you do this, just build and configuration windows. I have been unsuccessful getting a solution property window added to the project/solution. I can't even say what project type the solution is.

    I have noticed that I have different dates on two sets of Unity binaries that have been installed. One set is under the where the Origami project installed. There the UnityEngine.dll has ‎March ‎23, ‎2016, ‏‎9:52:02 PM, referenced by the Origami project. The other is under C:\Users...\Documents\HelloHololens\VS2015\HelloHololens\Unprocessed with ‎Monday, ‎March ‎28, ‎2016, ‏‎12:54:19 PM

    I have been unsuccessful switching the DLLs as an experiment so far. Basically the project seems so abnormal I am unable to get a change to stick or resolve.

    Amended: swapped the DLLs above, and they were obviously older, (no version number displayed on properties for the DLLs).

    Amended: Down to one build error, not sure the signatures are a true match but added to global declarations...

    SurfaceChangedDelegate onSurfaceChanged;
    SurfaceDataReadyDelegate onSurfaceDataReady;
    

    Changed/Added to Start()...
    onSurfaceChanged += Observer_OnSurfaceChanged;
    onSurfaceDataReady += Observer_onSurfaceDataReady

    Added Method, (no processing as I don't have a clue yet)...
    private void Observer_onSurfaceDataReady(SurfaceData bakedData, bool outputWritten, float elapsedBakeTimeSeconds)
    {

    }
    

    Final error, (there's a version 6?)...

    on: using static UnityEngine.VR.WSA.SurfaceObserver;

    The error:
    Severity Code Description Project File Line Suppression State
    Error CS8025 Feature 'using static' is not available in C# 4. ** Please use language version 6 or greater.** Origami.CSharp D:\Hololens\HolographicAcademy-Holograms-101\HolographicAcademy-Holograms-101\Origami\Assets\Holograms\Support\Spatial Mapping\SpatialMapping.cs 5 Active

  • james_ashleyjames_ashley ✭✭✭✭

    @Ash said:

    @james_ashley said:
    You can get the hololens capable version of Unity with the Unity.VR.WSA namespace here.

    Thanks James. So if we install that version of Unity and this update for Visual Studio we should be good to go for Hololens development and emulator testing?

    Plus the hololens tools, which includes the emulator and project templates.

    So all you need is 1) Visual Studio Update 2 2) special version of Unity for hololens 3) hololens toolkit and 4) a towel. yes.

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • there is currently a version conflict with generating code from unity and running it on the hololens emulator: The preview build of unity provided requires that the windows 10 sdk 10.0.10240 be installed to target and generate code for UWP.. However in VS to debug an app on the hololens emulator successfully you need to target 10.0.10586.0. How can this be resolved?

  • Ooookay so here was my issue... the way Unity handles installed windows 10 SDK's was not flexible at all. I had to remove both Windows 10 SDK's installed by VS and then install the 10.0.10586.15 SDK standalone installer to generate the code successfully that can be debugged on the hololens emulator.

  • I guess no one else is having this issue, (four post above). I could only change to C# 6 and framework 4.5.2 by editing the project file with notepad. After doing so I have no build errors. However everything I access the project from Unity or attached to Unity from the project Unity puts it back to C# version 4 and 3.5 framework. I've tried everything such as deleting the folder, (killing the Unity project reference in the process), but still ending up back at C# 4. There's hooks somewhere but do far haven't found them. Is no one else having or have experienced this?

  • Answer ✓

    The SpatialMapping.cs file was updated on github by the team. You can get it here:
    https://raw.githubusercontent.com/Microsoft/HolographicAcademy/master/Origami/Assets/Holograms/Support/Spatial%20Mapping/SpatialMapping.cs

    This should clear up the SpatialMapping reference issues.

    Dwight Goins
    CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
    MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
    http://dgoins.wordpress.com

  • @Dwight_Goins_EE_MVP Thanks Dwight - that has cleared up the Spatial Mapping problems completely. Now I just need to sort out my missing Assembly-CSharp-firstpass.dll errors when I try to launch in the emulator.

  • The Assembly-CSharp-firstpass.dll is the cs project Unity creates for embedding all your standard scripts during the first phase of compilation. If you're missing a script, just add it to the standard assets folder.

    Dwight Goins
    CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
    MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
    http://dgoins.wordpress.com

  • Any thoughts on what might cause this error?

    Assets/Holograms/Support/Spatial Mapping/SpatialMapping.cs(139,1): error CS8025: Parsing error

  • I believe I have the updated SpatialMapping.cs file.

  • copy paste, fat finger, typo most likely. Check the copy paste encoding is a " really a quote? That's most likely your error if the Unity editor can't parse it, or VS.Net can't parse it.

    Dwight Goins
    CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
    MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
    http://dgoins.wordpress.com

  • Thanks for your response, Dwight. How do I find it? Does the (139,1) mean the problem is on line 139? There are 139 lines in the file.

  • Dwight, your suggestion was right on the money. The closing brace of the last code section was missing. I added one on line 140. Now I get this error:

    Assets/Holograms/Support/Spatial Mapping/SpatialMapping.cs(140,1): error CS8025: Parsing error

    Does this point out a way forward?

  • Dwight, your suggestion was doubly right. I just figured out that TWO closing braces were missing at the end of the file. I am now past the error.

  • @Dwight_Goins_EE_MVP said:
    The SpatialMapping.cs file was updated on github by the team. You can get it here:
    https://raw.githubusercontent.com/Microsoft/HolographicAcademy/master/Origami/Assets/Holograms/Support/Spatial%20Mapping/SpatialMapping.cs

    This should clear up the SpatialMapping reference issues.

    Looks like the link doesn't work anymore. And the HoloAcademy stuff is no longer present in github. I can only find the HoloToolkit information.

  • Hey @thenappingkat,
    Can you try using the link provided in the course documentation?
    https://github.com/Microsoft/HolographicAcademy/archive/Holograms-230-SpatialMapping.zip

    Note: the Spatial Mapping course and HoloToolkit use the same spatial mapping components, so either option should work for you.

  • TyroTyro
    edited April 2016

    I'm getting the following problems in my Vis Studio build with this same project (Origami Sample Project)-

    Error NuGet Package restore failed for project Origami for 'Microsoft.ApplicationInsights (>= 1.0.0)'.

    Error NuGet Package restore failed for project Origami for 'Microsoft.ApplicationInsights.PersistenceChannel (>= 1.0.0)'.

    Error NuGet Package restore failed for project Origami for 'Microsoft.ApplicationInsights.WindowsApps (>= 1.0.0)'.

    Error Unable to resolve Microsoft.ApplicationInsights (>= 1.0.0) for UAP,Version=v10.0.

    Error Unable to resolve Microsoft.ApplicationInsights.PersistenceChannel (>= 1.0.0) for UAP,Version=v10.0.

    Error Unable to resolve Microsoft.ApplicationInsights.WindowsApps (>= 1.0.0) for UAP,Version=v10.0.

    Error Your project.json doesn't list 'win10-x86' as a targeted runtime. You should add '"win10-x86": { }' inside your "runtimes" section in your project.json, and then re-run NuGet restore.

    That last one seems to make little sense, why doesn't the project come with win10-x86 as a targeted runtime when that's the exact platform the tutorial says we are designing for?

  • Dwight Goins
    CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
    MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
    http://dgoins.wordpress.com

  • I have the exact same issues as Molokan. I just installed all the tools today, so it should all work. I am 64 bit on everything if that makes a difference. Anything new related to this issue?

  • @Tyro said:
    I'm getting the following problems in my Vis Studio build with this same project (Origami Sample Project)-

    Error NuGet Package restore failed for project Origami for 'Microsoft.ApplicationInsights (>= 1.0.0)'.

    Error NuGet Package restore failed for project Origami for 'Microsoft.ApplicationInsights.PersistenceChannel (>= 1.0.0)'.

    Error NuGet Package restore failed for project Origami for 'Microsoft.ApplicationInsights.WindowsApps (>= 1.0.0)'.

    Error Unable to resolve Microsoft.ApplicationInsights (>= 1.0.0) for UAP,Version=v10.0.

    Error Unable to resolve Microsoft.ApplicationInsights.PersistenceChannel (>= 1.0.0) for UAP,Version=v10.0.

    Error Unable to resolve Microsoft.ApplicationInsights.WindowsApps (>= 1.0.0) for UAP,Version=v10.0.

    Error Your project.json doesn't list 'win10-x86' as a targeted runtime. You should add '"win10-x86": { }' inside your "runtimes" section in your project.json, and then re-run NuGet restore.

    That last one seems to make little sense, why doesn't the project come with win10-x86 as a targeted runtime when that's the exact platform the tutorial says we are designing for?

    I'm also having this issue and I have the latest Unity and Visual Studio. What could cause this?

Sign In or Register to comment.