Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

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.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. And always feel free to hit us up on Twitter @MxdRealityDev.

Error when building project in Unity

Hello all,
I have an issue that happens when I create a project in Unity and try to build it using the following the steps found here: https://developer.microsoft.com/en-us/windows/holographic/exporting_and_building_a_unity_visual_studio_solution

I keep getting this error:
UnityException: Failed to run reference rewriter with command --target="Temp\StagingArea\UnityEngine.UI.dll" --additionalreferences="Temp\StagingArea","C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade","C:\Program Files (x86)\Windows Kits\10\References\Windows.ApplicationModel.Calls.CallsVoipContract\1.0.0.0","C:\Program Files (x86)\Windows ........(LOTS OF THE SAME)......
Kits\10\References\Windows.UI.WebUI.Core.WebUICommandBarContract\1.0.0.0" --platform="C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade\Windows.winmd" --support="Temp\StagingArea\WinRTLegacy.dll" --supportpartialns=Unity.Partial --system=System --dbg=pdb --lock=UWP\project.lock.json --alt=System.Xml.Serialization;System.Collections,System.Collections.NonGeneric;System.Reflection,System.Reflection.TypeExtensions;System.IO,System.IO.FileSystem;System.Net,System.Net.Primitives;System.Net.Sockets,System.Net.Primitives;System.Xml,System.Xml.XmlDocument;,Windows.winmd;,Windows.ApplicationModel.Calls.CallsVoipContract.winmd;,Windows.ApplicationModel.Activation.WebUISearchActivatedEventsContract.winmd;,Windows.ApplicationModel.Background.BackgroundAlarmApplicationContract.winmd;,Windows.ApplicationModel.Calls.Background.CallsBackgroundContract.winmd;
...(MORE OF THE SAME).....
,Windows.UI.WebUI.Core.WebUICommandBarContract.winmd --ignore=System.IConvertible,mscorlib.
Catastrophic failure while running rrw: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade\Windows.winmd'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share) in g:\git\Unity-Technologies\cecil\Mono.Cecil\ModuleDefinition.cs:line 1056
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters) in g:\git\Unity-Technologies\cecil\Mono.Cecil\ModuleDefinition.cs:line 1044
at Unity.ReferenceRewriter.RewriteContext.For(String targetModule, DebugSymbolFormat symbolFormat, String supportModule, String supportModulePartialNamespace, String[] frameworkPaths, String projectLockFile, String[] additionalReferences, String platformPath, ICollection1 strongNamedReferences, ICollection1 winmdReferences, IDictionary2 alt, IDictionary2 ignore)
at Unity.ReferenceRewriter.Program.Main(String[] args)

PostProcessWinRT.RunReferenceRewriter () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:545)
PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:127)
UnityEditor.WSA.BuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:155)
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:186)
UnityEditor.HostView:OnGUI()

It is a really long error so I tried to get the jist of it. Anyway I have all the latest tools downloaded (Unity 5.5.0f3, Hololens emulator (build 10.0.14393.0), Vs 2015 with updates AND Tools (1.4.1) and Windows 10 SDK (10.0.10586) IS installed) except for Vuforia (didn't look like I needed it for getting started). When I attempt a build in Unity, it tries to build the project and gives me the option to select where to put the project (I create the "App" folder). It tries to build but the .sln file but it is not created in the App folder I selected, but the file the App folder is in (one level up) and there is nothing inside the solution. I've tried uninstalling and reinstalling everything and looked for solutions online. They all say that having VS tools 1.4 installed fixes everything.....well, not it my case, sadly. Any advice would by appreciated thanks.

Tagged:

Answers

  • Were you ever able to figure this out? We are experiencing the same error now too :/

  • I'm having the same issue as well :(

  • Me too :-(
    I have got all the requirements installed (Unity 5.5.2f1, VS 2015 Update 3, Windows SDKs...). But on my machine, the folder "C:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade" mentioned by the error message is missing (the Windows.winmd file is directly in the UnionMetadata folder). Can someone with a working setup have look at this?

  • While it is nice to see that others have gotten the same error, it would be great to get some kind of guidance about how to fix this. I am using Unity 5.5.2 on Windows 10 and reinstalled Unity to try to get rid of it, but no luck.

  • Following up on my post, I installed the latest version of Visual Studio Community (2017) and the Hololens Emulator, which forced a restart, and Unity will now build without errors.

  • edited March 2017

    .

  • Make sure your VS version above Visual Studio 2015 Update 3
    and you must check Tools (1.4) and Windows 10 SDK (10.0.10586) when you install VS.

  • I am working with an example from Microsoft which deals with running WebRtc on Universal Windows Platform, more specifically the Peer-CC example (https://github.com/Microsoft/WebRTC-universal-samples/tree/master/Samples/PeerCC-Sample)

    For me, the project was missing some .dll (more specifically Org.webRtc.dll). I copied the .dll but not the associated .winmd file.

    That was causing this error and was solved after coping the .winmd file.

Sign In or Register to comment.