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.

Academy 210 will not build in Visual Studio 2015

georgegeorge
edited June 2016 in Questions And Answers

Here is the 2 errors I am receiving:
warning CS8021: No value for RuntimeMetadataVersion found. No assembly containing System.Object was found nor was a value for RuntimeMetadataVersion specified through options.
System.Exception: Failed to generate networking code for ***\ModelExplorer\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Unprocessed\Assembly-CSharp-firstpass.dll:
1>EXEC : UNetWeaver error : Exception :System.IndexOutOfRangeException: Index was outside the bounds of the array.

VS doesn't build the Assembly-CSharp-firstpass.dll and then the build fails when it can't find the file.
I have tried starting from scratch twice and using the "completed" project from GitHub.
I am using Unity 5.4.0b18 and VS 2015 14.0.25123.00 Update 2.
I was able to run through Academy 101 without any problems.

Best Answer

Answers

  • ahillierahillier mod
    edited June 2016

    Hi @george,
    Double-check that you have the correct visual studio project opened (the one that is created inside of the 'App' folder), and that you have the correct build target defined in VS (Release, x86). If so, delete your existing APP and UWP folders and then rebuild from Unity again before opening and building the solution in VS.

    I've seen serialization weaver errors before (which might be similar to the UNetWeaver error that you are hitting), which will occur when the file path is too long or there are spaces in the path. Try shortening your path (move your project to the C:\ drive) and remove any spaces, if they exist.

    Also, VS will sometimes fail during the first build/deploy, but will usually succeed during the next round. So if you haven't hit build a second time, it might be worth a try.

  • @ahillier said:
    Hi @george,
    Double-check that you have the correct visual studio project opened (the one that is created inside of the 'App' folder), and that you have the correct build target defined in VS (Release, x86). If so, delete your existing APP and UWP folders and then rebuild from Unity again before opening and building the solution in VS.

    I've seen serialization weaver errors before (which might be similar to the UNetWeaver error that you are hitting), which will occur when the file path is too long or there are spaces in the path. Try shortening your path (move your project to the C:\ drive) and remove any spaces, if they exist.

    Also, VS will sometimes fail during the first build/deploy, but will usually succeed during the next round. So if you haven't hit build a second time, it might be worth a try.

    I just tried all the options you recommended. I deleted both folders and re-built the project in Unity (double-checking all the settings). The project is in a main folder with no spaces and I tried to deploy it multiple times to the HoloLens. I am still receiving the same errors.

    I'm at a complete loss. As I said in my original post, I have built the 101 example and deployed it with no issues.

  • Awesome! I'm glad that you found the issue. Thanks for sharing so that future community members can benefit from your learning :)

  • I just benefitted!

  • to get this to work, in Unity, i had to uncheck: Build Settings -> Debugging -> Unity C# Projects

  • @george said:
    I found the problem!

    I had previously stopped NuGet from checking for packages during build time.

    This setting is under Tools -> Options -> NuGet Package Manager -> Automatically check for missing packages during build in Visual Studio.

    Once I turned this option on, the build succeeded and deployed to the HoloLens.

    Lesson learned

    This one worked for me after one day of struggling! thank you @george

Sign In or Register to comment.