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

NuGet Package restore failed for project Origami

Raj_HLRaj_HL
edited April 2016 in Questions And Answers

Why do I get following errors in the VS solution for Origami? Can anyone help me out? The build is running fine from the unity but when the VS solution is opened it gives me these errors.
1. Error: NuGet Package restore failed for project Origami for 'Microsoft.ApplicationInsights.WindowsApps (>= 1.0.0)'.
2. Error: Unable to resolve Microsoft.ApplicationInsights (>= 1.0.0) for UAP,Version=v10.0.
3. Could not copy the file "C:\Users\xxxx\Desktop\Hololens\HolographicAcademy-Holograms-101\Origami\App\Origami\Plugins\x64\AudioPluginMsHRTF.dll" because it was not found. Origami.

Best Answer

Answers

  • Options

    Thanks David. Taking the new code cleared the Audio plugin error. I changed the build to x86, thanks for that.
    Nuget package restore error is still showing up when I build the project in VS. Do you know what can cause Nuget package error in this case?

  • Options
    ahillierahillier mod
    edited April 2016

    Hi @Raj_HL,
    Open NuGet settings in VS (Tools > NuGet Package Manager > Package Manager Settings) and verify that 'Allow NuGet to download missing package' and 'Automatically check for missing package during build in Visual Studio' options are both checked.

    If those options were already checked, then I would suggest doing the following:
    1. Close VS and Unity.
    2. Delete your VS build folders (UWP and/or App)
    3. Restart Unity and rebuild.
    4. Reload the project in VS.
    5. Build and deploy from VS as usual. If you get a lot of errors during the first build, try rebuilding again (they should go away).

    Finally, if you have not updated to the latest versions of Unity and Visual Studio, then you will want to do that too.

  • Options

    Hello @ahillier Thank you, I did all the steps you guided me through. Now I have more errors. I have the latest Unity preview build for hololens and also the VS update 2.

  • Options

    @Raj_HL,
    Can you send a screen shot of the build settings that you are using in Unity and VS? Perhaps one of them is incorrect. Are you using Win10? There should be a 'Catch up Chapters' folder that came with Origami. Try loading one of the chapter projects (like 2-HoloWorld-Completed) to rule out any errors in code.
    ~Angela

  • Options

    @ahillier I loaded the chapter projects too and still I have build issues with the VS. I dont have the hololens emulator downloaded as I dont have the Win 10 Pro, but I have a Win 10 Home. Do you think not having the emulator can cause this build issue?
    I am attaching the screenshot for build settings of my Unity project.

  • Options

    Hi @Raj_HL,
    Are you still hitting this issue? Some people were getting build errors with the new Unity this week due to having file paths that are too long. Most people have been able to resolve their errors by moving their project to the C:\ drive, deleting all folders and files in the project folder except for 'Assets' and 'Project Settings', then reloading/building in Unity.

    Your Unity build settings look correct. Be sure to open the visual studio solution file that is in the 'App' folder (not the one that is created in higher-level project folder). In Visual Studio, change the 'Debug' dropdown to 'Release' and change 'ARM' to 'x86'.

    Since you don't have an emulator or HoloLens, you won't be able to deploy your project, but you should still be able to build the solution (use 'Build > Build Solution', instead of 'Debug > Start Without Debugging').

    Let me know if that gets you any further, or if you encounter a different set of errors.

  • Options

    @achillier I couldn't resolve the issue yet.
    I think this has something to do with the framework. Now the errors on VS build includes the following error,

    The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

    I have the .Net framework 4.6.1 and 4.6.2. As per the microsoft website these are the latest. Do I need to download a different framework version?
    And when I click the Add Reference on References in VS, it shows that No Framework assemblies were found on this machine.

  • Options

    @achillier I was able to resolve the errors by browsing to the .Net Framework folder in my Program Files Directory and adding the System.Runtime and System.ObjectModel references to the Origami Project.
    Thanks a lot for your help!

  • Options

    @ahillier said:
    Hi @Raj_HL,
    Open NuGet settings in VS (Tools > NuGet Package Manager > Package Manager Settings) and verify that 'Allow NuGet to download missing package' and 'Automatically check for missing package during build in Visual Studio' options are both checked.

    If those options were already checked, then I would suggest doing the following:
    1. Close VS and Unity.
    2. Delete your VS build folders (UWP and/or App)
    3. Restart Unity and rebuild.
    4. Reload the project in VS.
    5. Build and deploy from VS as usual. If you get a lot of errors during the first build, try rebuilding again (they should go away).

    Finally, if you have not updated to the latest versions of Unity and Visual Studio, then you will want to do that too.

Sign In or Register to comment.