如何使用适用于 HoloLens 1 的 MRTK v2 RC 构建和部署可工作的统一应用程序? [英] How to build and deploy a working unity app with MRTK v2 RC for HoloLens 1?

查看:39
本文介绍了如何使用适用于 HoloLens 1 的 MRTK v2 RC 构建和部署可工作的统一应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题
综上所述,Unity 和 Visual Studio 2017 都构建了项目,部署了项目,但是一旦打开应用程序,什么也没有出现,甚至连 Unity 启动画面都没有.然而,在 HoloLens 上做出绽放手势证明该应用程序是打开的"和可关闭的,但仅此而已.

我们的尝试
我们的部署目标是运行所述设备的最新操作系统 (10.0.17763.380) 的 HoloLens 1.
我们在这里完成了提供的解决方案:

这似乎与问题的其他答案相冲突.
然而,此解决方案尝试提供了另一个错误,即部署目标(HoloLens 1)必须运行 OS 10.0.18326,这是有道理的,因为据我们所知,此特定设备不存在此操作系统.我们如前所述,在最新的操作系统 10.0.17763 上运行.

至于将 C# 语言更改为 7.2,我们遇到了麻烦,因为所有指南都说要从 解决方案属性 中的 Build 访问该语言,但我们无法找到这个选项卡.下面是当我们在 Visual Studio 层次结构中右键单击 projectname.sln 后尝试按属性"时发生的情况:

但是,我们希望可以更改语言设置,如下所示:

但正如您所看到的,没有构建"选项卡,我们看到的内容与我们建议显示的内容相差甚远.

我们的期望
一个可用的 HoloLens 1 应用程序,可以像 MRTK v2 Beta 版一样打开.

实际发生了什么
正如问题中提到的,应用程序构建和部署,但它不仅充满错误,打开构建的应用程序也没有任何显示.

<小时>

可以在此处看到 Unity 错误:

参考重写器:错误:目标框架中不存在字段System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position".它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState) 中引用的.UnityEngine.Debug:LogError(Object)PostProcessWinRT:RunReferenceRewriter()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)PostProcessWinRT:Process()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)参考重写器:错误:目标框架中不存在字段System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position".它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState) 中引用的.UnityEngine.Debug:LogError(Object)PostProcessWinRT:RunReferenceRewriter()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)PostProcessWinRT:Process()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)参考重写器:错误:目标框架中不存在字段System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Normal".它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState) 中引用的.UnityEngine.Debug:LogError(Object)PostProcessWinRT:RunReferenceRewriter()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)PostProcessWinRT:Process()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)参考重写器:错误:目标框架中不存在字段System.Numerics.Quaternion Windows.Perception.People.JointPose::Orientation".它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState) 中引用的.UnityEngine.Debug:LogError(Object)PostProcessWinRT:RunReferenceRewriter()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)PostProcessWinRT:Process()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)参考重写器:错误:目标框架中不存在字段System.Numerics.Vector3 Windows.Perception.People.JointPose::Position".它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState) 中引用的.UnityEngine.Debug:LogError(Object)PostProcessWinRT:RunReferenceRewriter()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)PostProcessWinRT:Process()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)参考重写器:错误:目标框架中不存在字段 `System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Origin`.它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update() 中引用的.UnityEngine.Debug:LogError(Object)PostProcessWinRT:RunReferenceRewriter()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)PostProcessWinRT:Process()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)参考重写器:错误:目标框架中不存在字段System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Direction".它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update() 中引用的.UnityEngine.Debug:LogError(Object)PostProcessWinRT:RunReferenceRewriter()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)PostProcessWinRT:Process()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference Rewriter 在使用命令--target=TempStagingAreaDataManagedAssembly-CSharp.dll"--target=TempStagingAreaDataManagedUnity.Analytics"运行时发现一些错误.DataPrivacy.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Utilities.Gltf.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Services.TeleportSystem.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Services.SpatialAwarenessSystem.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Services.InputSystem.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Services.DiagnosticsSystem.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Services.BoundarySystem.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.SDK.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Extensions.PhotoCapture.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Extensions.Experimental.SpectatorView.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Extensions.Experimental.Sharing.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Extensions.Experimental.ScreenRecording.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Extensions.Experimental.MarkerDetection.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Core.Utilities.Async.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Providers.WindowsVoiceInput.dll" "--target=TempStagingAreaDataManagedUnity.Subsystem.Registration.dll" "--target=TempStagingAreaDataManagedUnity.TextMeshPro.dll" "--target=Temp暂存区数据管理dUnity.XR.ARExtensions.dll" "--target=TempStagingAreaDataManagedUnity.XR.WindowsMR.dll" "--target=TempStagingAreaDataManagedUnity.XR.FaceSubsystem.dll" "--target=TempStagingAreaDataManagedUnity.XR.ARFoundation.dll" "--target=TempStagingAreaDataManagedUnityEngine.Timeline.dll" "--target=TempStagingAreaDataManagedUnityEngine.SpatialTracking.dll" "--target=TempStagingAreaDataManagedUnity.Analytics.Tracker.dll" "--target=TempStagingAreaDataManagedUnity.Analytics.StandardEvents.dll" "--additionalreferences=TempStagingAreaDataManaged,TempStagingAreaDataManagedPluginsX86,TempStagingAreaDataManagedPluginsX64,TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsX64,TempStagingAreaDataManagedPluginsARM,TempStagingAreaDataManagedPluginsX86,TempStagingAreaDataManagedPluginsX64,TempStagingAreaDataManagedPluginsX86,TempStagingAreaDataManagedPluginsX64、TempStagingAreaDataManagedPluginsX86、TempStagingAreaDataManagedPluginsx86、TempStagingAreaDataManagedPluginsx86、TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsx86""--platform=C:Program Files (x86)Windows Kits10UnionMetadata10.0.18362.0FacadeWindows.winmd" "--dbg=pdb" "--framework=TempStagingAreaDataManaged" "--alt=Microsoft.Win32.SafeHandles,mscorlib;System,mscorlib;System,System;System,System.ComponentModel.Composition;System,System.Core;System.CodeDom.Compiler,System;System.Collections,mscorlib;System.Collections.Concurrent,mscorlib;System.Collections.Concurrent,System;System.Collections.Generic,mscorlib;System.Collections.Generic,System;System.Collections.Generic,System.Core;System.Collections.ObjectModel,mscorlib;System.Collections.ObjectModel,System;System.Collections.Specialized,System;System.ComponentModel,System;System.ComponentModel.DataAnnotations,System.ComponentModel.DataAnnotations;System.ComponentModel.DataAnnotations.Schema,System.ComponentModel.DataAnnotations;System.Data,System.Data;System.Data.Common,System.Data;System.Diagnostics,mscorlib;System.Diagnostics,System;System.Diagnostics.CodeAnalysis,mscorlib;System.Diagnostics.Contracts,mscorlib;System.Diagnostics.Tracing,mscorlib;System.Dynamic,System.Core;System.Globalization,mscorlib;System.IO,mscorlib;System.IO,System;System.IO,System.Core;System.IO.Compression,System;System.IO.Compression,System.IO.Compression.FileSystem;System.IO.IsolatedStorage,mscorlib;System.Linq,System.Core;System.Linq.表达式,System.Core;System.Net,System;System.Net.NetworkInformation,System;System.Net.Security,System;System.Net.Sockets,System;System.Numerics,System.Numerics;System.Reflection,mscorlib;System.Reflection.Emit,mscorlib;System.Resources,mscorlib;System.Runtime,mscorlib;System.Runtime.CompilerServices,mscorlib;System.Runtime.CompilerServices,System.Core;System.Runtime.ExceptionServices,mscorlib;System.Runtime.InteropServices,mscorlib;System.Runtime.InteropServices,System;System.Runtime.InteropServices,System.Core;System.Runtime.InteropServices.ComTypes,mscorlib;System.Runtime.InteropServices.ComTypes,System;System.Runtime.InteropServices.WindowsRuntime,mscorlib;System.Runtime.Serialization,mscorlib;System.Runtime.Serialization,System.Runtime.Serialization;System.Runtime.Serialization.Json,System.Runtime.Serialization;System.Runtime.Versioning,mscorlib;System.Runtime.Versioning,System;System.Security,mscorlib;System.Security.Authentication,System;System.Security.Authentication.ExtendedProtection,System;System.Security.Claims,mscorlib;System.Security.Principal,mscorlib;System.Text,mscorlib;System.Text.RegularExpressions,System;System.Threading,mscorlib;System.Threading,System;System.Threading,System.Core;System.Threading.Tasks,mscorlib;System.Threading.Tasks,System.核心;System.Windows.Input,System;System.Xml,System.Runtime.Serialization;System.Xml,System.Xml;System.Xml.Linq,System.Xml.Linq;System.Xml.Schema,System.Xml;System.Xml.Serialization,System.Xml;,Windows.winmd;,Windows.AI.MachineLearning.MachineLearningContract.winmd;<winmd>,Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract.winmd;<winmd>,Windows.ApplicationModel.Calls.Background.CallsBackgroundContract.winmd;<winmd>,Windows.ApplicationCallsPhoneContract.winmd;,Windows.ApplicationModel.Calls.CallsVoipContract.winmd;,Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd;,Windows.ApplicationModel.SocialInfo.SocialInfoContract.;winmd>,Windows.ApplicationModel.StartupTaskContract.winmd;,Windows.Devices.Custom.CustomDeviceContract.winmd;,Windows.Devices.DevicesLowLevelContract.winmd;,Windows.Devices.Printers.PrintersContract.winmd;,Windows.Devices.SmartCards.SmartCardBackgroundTriggerContract.winmd;<winmd>,Windows.Devices.SmartCards.SmartCardEmulatorContract.winmd;<winmd>,Windows.Foundation.FoundationContract.winmd;<winmd>,Windows.Foundation.UniversalApiContract.winmd;<Windows.winmd>Gaming.XboxLive.StorageApiContract.winmd;,Windows.Graphics.Printing3D.Printing3DContract.winmd;,Windows.Networking.Connectivity.WwanContract.winmd;,Windows.Networking.Sockets.ControlChannelTriggerContract.winmd;,Windows.Services.Maps.GuidanceContract.winmd;,Windows.Services.Maps.LocalSearchContract.winmd;,Windows.Services.Store.StoreContract.winmd;,Windows.System.SystemManagementContract.winmd;,Windows.UI.ViewManagement.ViewManagementViewScalingContract.winmd;,Windows.UI.Xaml.Core.Direct.XamlDirectContract.winmd;,Windows.ApplicationModels.Activation.ActivatedEvent.winmd;,Windows.ApplicationModel.Activation.ActivationCameraSettingsContract.winmd;,Windows.ApplicationModel.Activation.ContactActivatedEventsContract.winmd;,Windows.ApplicationModel.Activation.WebUISearchActivatedEventsContract.winmd>,Windows.ApplicationModel.Background.BackgroundAlarmApplicationContract.winmd;,Windows.ApplicationModel.Calls.LockScreenCallContract.winmd;,Windows.ApplicationModel.FullTrustAppContract.winmd;,Windows.ApplicationPreview.InkWorkspace.PreviewInkWorkspaceContract.winmd;,Windows.ApplicationModel.Preview.Notes.PreviewNotesContract.winmd;,Windows.ApplicationModel.Resources.Management.ResourceIndexerContract.winmd;,Windows.ApplicationModel.Search.Core.SearchCoreContract.winmd;,Windows.ApplicationModel.Search.SearchContract.winmd;,Windows.ApplicationModel.Wallet.WalletContract.winmd;<;winmd>,Windows.Devices.Portable.PortableDeviceContract.winmd;,Windows.Devices.Printers.Extensions.ExtensionsContract.winmd;,Windows.Devices.Scanners.ScannerDeviceContract.winmd;,Windows.Devices.Sms.LegacySmsApiContract.winmd;<winmd>,Windows.Gaming.Input.GamingInputPreviewContract.winmd;<winmd>,Windows.Gaming.Preview.GamesEnumerationContract.winmd;<winmd>,Windows.GamingUI.GameChatOverlayContract.winmd;<winmd>,Windows.Gaming.UI.GamingUIProviderContract.winmd;<winmd>,Windows.Globalization.GlobalizationJapanesePhoneticAnalyzerContract.winmd;<winmd>,Windows.Management.Deployment.Preview.Contract.;<winmd>,Windows.Management.Workplace.WorkplaceSettingsContract.winmd;<winmd>,Windows.Media.AppBroadcasting.AppBroadcastingContract.winmd;,Windows.Media.AppRecording.AppRecordingContract.winmd;,Windows.Media.Capture.AppBroadcastContract.winmd;,Media.Capture.AppCaptureContract.winmd;,Windows.Media.Capture.AppCaptureMetadataContract.winmd;,Windows.Media.Capture.CameraCaptureUIContract.winmd;,Windows.Media.Capture.GameBarContract.winmd;,Windows.Media.Devices.CallControlContract.winmd;,Windows.Media.MediaControlContract.winmd;,Windows.Media.Playlists.PlaylistsContract.winmd;,Windows.Media.Protection.ProtectionRenewalContract.winmd;,Windows.Networking.NetworkOperators.LegacyNetworkOperatorsContract.winmd;,Windows.Networking.XboxLive.XboxLiveSecureSocketsContract.winmd;Automation.Core.PerceptionAutomationCoreContract.winmd;,Windows.Security.EnterpriseData.EnterpriseDataContract.winmd;,Windows.Security.ExchangeActiveSyncProvisioning.EasContract.winmd;,Windows.Storage.Provider.CloudFilesContract.winmd;,Windows.System.Profile.ProfileRetailInfoContract.winmd;<winmd>,Windows.System.UserProfile.UserProfileContract.winmd;<winmd>,Windows.System.UserProfile.UserProfileLockScreenContract.winmd;<winmd>,Windows.UI.ApplicationSettings.ApplicationsSettingsContract.winmd;<winmd>,Windows.UI.Core.AnimationMetrics.AnimationMetricsContract.winmd;<winmd>,Windows.UI.Core.CoreWindowDialogsContract.winmd;<winmd>,Windows.UI.Shell.SecurityAppManagerContract.winmd;<winmd>,Windows.UI.Xaml.Hosting.HostingContract.winmd;<winmd>,Windows.Web.Http.Diagnostics.HttpDiagnosticsContract.winmd;<winmd>,Windows.Embedded.DeviceLockdown.DeviceLockdownContract.winmd;<winmd>,Windows.Networking.NetworkOperators.NetworkOperatorsFdnContract.winmd;,Windows.Phone.PhoneContract.winmd;,Windows.Phone.StartScreen.DualSimTileContract.winmd;,Windows.UI.WebUI.Core.WebUICommandBarContract.winmd" "--ignore=System.IConvertible,mscorlib".错误:目标框架中不存在字段System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position".它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState) 中引用的.错误:目标框架中不存在字段System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position".它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState) 中引用的.错误:目标框架中不存在字段 `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Normal`.它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState) 中引用的.错误:目标框架中不存在字段System.Numerics.Quaternion Windows.Perception.People.JointPose::Orientation".它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState) 中引用的.错误:目标框架中不存在字段System.Numerics.Vector3 Windows.Perception.People.JointPose::Position".它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState) 中引用的.错误:目标框架中不存在字段 `System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Origin`.它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update() 中引用的.错误:目标框架中不存在字段System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Direction".它是从 Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll 在 System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update() 中引用的.UnityEngine.Debug:LogError(Object)PostProcessWinRT:RunReferenceRewriter()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1062)PostProcessWinRT:Process()(在 C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

<小时>

Visual Studio 2017 错误可以在这里看到:
(粘贴超过了 30000 个字符的 stackoverflow 限制,所以我提供了一个 pastebin)
https://pastebin.com/bx2QA2wL

解决方案

以Reference Rewriter"开头的错误是良性的,可以安全地忽略,(由 这个错误).

您正在构建的 SampleScene 可能实际上是空的,换句话说,没有内容.尝试构建和部署位于 AssetsMixedRealityToolkit.ExamplesDemosHandTrackingScenesHandInteractionExamples.unity 的 HandInteractionAllExample 场景可能是个好主意.

否则,您的步骤看起来是正确的.另请参阅此答案,了解有关如何使用 MRTK v2 构建 UWP 的说明.

The problem
To sum up, both Unity and Visual Studio 2017 builds the project, deploys the project, but once opening the app, nothing appears, not even a Unity splash screen. However making the bloom gesture on HoloLens proved that the app is "open" and closable, but that's as far as it gets.

What we tried
Our deployment target is a HoloLens 1 running the latest OS for said device (10.0.17763.380).
We went through the provided solution here: MRTK (V2) Need to update Hololens?

As can be seen in below image:
NOTE: Images below shows Visual Studio 2019, but we tested both cases with Visual Studio 2017 AND Visual Studio 2019.

We installed the Windows 10 Insider Preview SDK (Pardon the Danish)

And tried to follow the solution provided here: Cannot build with MRTK v2.0.0-RC1

Which seems to conflict with what the other answer to the problem seemed to be.
This solution-attempt however provided another error, saying that the deployment target (HoloLens 1) had to run OS 10.0.18326, which makes sense as this OS does not exist for this particular device as far as we know. We're as previously mentioned, running on the latest OS which is 10.0.17763.

As far as changing the C# language to 7.2, we had troubles dealing with that as all guides says to access the language from Build in the Solution Properties but we were unable to find this tab. Here's what happens when we attempt to press "Properties" after right-clicking the projectname.sln in the Visual Studio hierarchy:

However, we hoped we could change the language settings as in here:

but as you can see, there's no "Build" tab, and what we see looks a bit far from what we're suggested should be shown.

What we hoped for
A working HoloLens 1 app that can be opened up, like with the MRTK v2 Beta version.

What actually happens
As mentioned in the problem, the app gets built and deployed, but not only is it filled with errors, nothing appears on opening the built app.


Unity errors can be seen here:

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Normal` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Quaternion Windows.Perception.People.JointPose::Orientation` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.People.JointPose::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Origin` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update().
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference rewriter: Error: field `System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Direction` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update().
UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1064)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Reference Rewriter found some errors while running with command "--target=TempStagingAreaDataManagedAssembly-CSharp.dll" "--target=TempStagingAreaDataManagedUnity.Analytics.DataPrivacy.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Utilities.Gltf.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Services.TeleportSystem.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Services.SpatialAwarenessSystem.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Services.InputSystem.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Services.DiagnosticsSystem.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Services.BoundarySystem.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.SDK.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Extensions.PhotoCapture.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Extensions.Experimental.SpectatorView.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Extensions.Experimental.Sharing.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Extensions.Experimental.ScreenRecording.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Extensions.Experimental.MarkerDetection.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Core.Utilities.Async.dll" "--target=TempStagingAreaDataManagedMicrosoft.MixedReality.Toolkit.Providers.WindowsVoiceInput.dll" "--target=TempStagingAreaDataManagedUnity.Subsystem.Registration.dll" "--target=TempStagingAreaDataManagedUnity.TextMeshPro.dll" "--target=TempStagingAreaDataManagedUnity.XR.ARExtensions.dll" "--target=TempStagingAreaDataManagedUnity.XR.WindowsMR.dll" "--target=TempStagingAreaDataManagedUnity.XR.FaceSubsystem.dll" "--target=TempStagingAreaDataManagedUnity.XR.ARFoundation.dll" "--target=TempStagingAreaDataManagedUnityEngine.Timeline.dll" "--target=TempStagingAreaDataManagedUnityEngine.SpatialTracking.dll" "--target=TempStagingAreaDataManagedUnity.Analytics.Tracker.dll" "--target=TempStagingAreaDataManagedUnity.Analytics.StandardEvents.dll" "--additionalreferences=TempStagingAreaDataManaged,TempStagingAreaDataManagedPluginsX86,TempStagingAreaDataManagedPluginsX64,TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsX64,TempStagingAreaDataManagedPluginsARM,TempStagingAreaDataManagedPluginsX86,TempStagingAreaDataManagedPluginsX64,TempStagingAreaDataManagedPluginsX86,TempStagingAreaDataManagedPluginsX64,TempStagingAreaDataManagedPluginsX86,TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsx86,TempStagingAreaDataManagedPluginsx86" "--platform=C:Program Files (x86)Windows Kits10UnionMetadata10.0.18362.0FacadeWindows.winmd" "--dbg=pdb" "--framework=TempStagingAreaDataManaged" "--alt=Microsoft.Win32.SafeHandles,mscorlib;System,mscorlib;System,System;System,System.ComponentModel.Composition;System,System.Core;System.CodeDom.Compiler,System;System.Collections,mscorlib;System.Collections.Concurrent,mscorlib;System.Collections.Concurrent,System;System.Collections.Generic,mscorlib;System.Collections.Generic,System;System.Collections.Generic,System.Core;System.Collections.ObjectModel,mscorlib;System.Collections.ObjectModel,System;System.Collections.Specialized,System;System.ComponentModel,System;System.ComponentModel.DataAnnotations,System.ComponentModel.DataAnnotations;System.ComponentModel.DataAnnotations.Schema,System.ComponentModel.DataAnnotations;System.Data,System.Data;System.Data.Common,System.Data;System.Diagnostics,mscorlib;System.Diagnostics,System;System.Diagnostics.CodeAnalysis,mscorlib;System.Diagnostics.Contracts,mscorlib;System.Diagnostics.Tracing,mscorlib;System.Dynamic,System.Core;System.Globalization,mscorlib;System.IO,mscorlib;System.IO,System;System.IO,System.Core;System.IO.Compression,System;System.IO.Compression,System.IO.Compression.FileSystem;System.IO.IsolatedStorage,mscorlib;System.Linq,System.Core;System.Linq.Expressions,System.Core;System.Net,System;System.Net.NetworkInformation,System;System.Net.Security,System;System.Net.Sockets,System;System.Numerics,System.Numerics;System.Reflection,mscorlib;System.Reflection.Emit,mscorlib;System.Resources,mscorlib;System.Runtime,mscorlib;System.Runtime.CompilerServices,mscorlib;System.Runtime.CompilerServices,System.Core;System.Runtime.ExceptionServices,mscorlib;System.Runtime.InteropServices,mscorlib;System.Runtime.InteropServices,System;System.Runtime.InteropServices,System.Core;System.Runtime.InteropServices.ComTypes,mscorlib;System.Runtime.InteropServices.ComTypes,System;System.Runtime.InteropServices.WindowsRuntime,mscorlib;System.Runtime.Serialization,mscorlib;System.Runtime.Serialization,System.Runtime.Serialization;System.Runtime.Serialization.Json,System.Runtime.Serialization;System.Runtime.Versioning,mscorlib;System.Runtime.Versioning,System;System.Security,mscorlib;System.Security.Authentication,System;System.Security.Authentication.ExtendedProtection,System;System.Security.Claims,mscorlib;System.Security.Principal,mscorlib;System.Text,mscorlib;System.Text.RegularExpressions,System;System.Threading,mscorlib;System.Threading,System;System.Threading,System.Core;System.Threading.Tasks,mscorlib;System.Threading.Tasks,System.Core;System.Windows.Input,System;System.Xml,System.Runtime.Serialization;System.Xml,System.Xml;System.Xml.Linq,System.Xml.Linq;System.Xml.Schema,System.Xml;System.Xml.Serialization,System.Xml;<winmd>,Windows.winmd;<winmd>,Windows.AI.MachineLearning.MachineLearningContract.winmd;<winmd>,Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract.winmd;<winmd>,Windows.ApplicationModel.Calls.Background.CallsBackgroundContract.winmd;<winmd>,Windows.ApplicationModel.Calls.CallsPhoneContract.winmd;<winmd>,Windows.ApplicationModel.Calls.CallsVoipContract.winmd;<winmd>,Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd;<winmd>,Windows.ApplicationModel.SocialInfo.SocialInfoContract.winmd;<winmd>,Windows.ApplicationModel.StartupTaskContract.winmd;<winmd>,Windows.Devices.Custom.CustomDeviceContract.winmd;<winmd>,Windows.Devices.DevicesLowLevelContract.winmd;<winmd>,Windows.Devices.Printers.PrintersContract.winmd;<winmd>,Windows.Devices.SmartCards.SmartCardBackgroundTriggerContract.winmd;<winmd>,Windows.Devices.SmartCards.SmartCardEmulatorContract.winmd;<winmd>,Windows.Foundation.FoundationContract.winmd;<winmd>,Windows.Foundation.UniversalApiContract.winmd;<winmd>,Windows.Gaming.XboxLive.StorageApiContract.winmd;<winmd>,Windows.Graphics.Printing3D.Printing3DContract.winmd;<winmd>,Windows.Networking.Connectivity.WwanContract.winmd;<winmd>,Windows.Networking.Sockets.ControlChannelTriggerContract.winmd;<winmd>,Windows.Services.Maps.GuidanceContract.winmd;<winmd>,Windows.Services.Maps.LocalSearchContract.winmd;<winmd>,Windows.Services.Store.StoreContract.winmd;<winmd>,Windows.Services.TargetedContent.TargetedContentContract.winmd;<winmd>,Windows.System.Profile.ProfileHardwareTokenContract.winmd;<winmd>,Windows.System.Profile.ProfileSharedModeContract.winmd;<winmd>,Windows.System.Profile.SystemManufacturers.SystemManufacturersContract.winmd;<winmd>,Windows.System.SystemManagementContract.winmd;<winmd>,Windows.UI.ViewManagement.ViewManagementViewScalingContract.winmd;<winmd>,Windows.UI.Xaml.Core.Direct.XamlDirectContract.winmd;<winmd>,Windows.ApplicationModel.Activation.ActivatedEventsContract.winmd;<winmd>,Windows.ApplicationModel.Activation.ActivationCameraSettingsContract.winmd;<winmd>,Windows.ApplicationModel.Activation.ContactActivatedEventsContract.winmd;<winmd>,Windows.ApplicationModel.Activation.WebUISearchActivatedEventsContract.winmd;<winmd>,Windows.ApplicationModel.Background.BackgroundAlarmApplicationContract.winmd;<winmd>,Windows.ApplicationModel.Calls.LockScreenCallContract.winmd;<winmd>,Windows.ApplicationModel.FullTrustAppContract.winmd;<winmd>,Windows.ApplicationModel.Preview.InkWorkspace.PreviewInkWorkspaceContract.winmd;<winmd>,Windows.ApplicationModel.Preview.Notes.PreviewNotesContract.winmd;<winmd>,Windows.ApplicationModel.Resources.Management.ResourceIndexerContract.winmd;<winmd>,Windows.ApplicationModel.Search.Core.SearchCoreContract.winmd;<winmd>,Windows.ApplicationModel.Search.SearchContract.winmd;<winmd>,Windows.ApplicationModel.Wallet.WalletContract.winmd;<winmd>,Windows.Devices.Portable.PortableDeviceContract.winmd;<winmd>,Windows.Devices.Printers.Extensions.ExtensionsContract.winmd;<winmd>,Windows.Devices.Scanners.ScannerDeviceContract.winmd;<winmd>,Windows.Devices.Sms.LegacySmsApiContract.winmd;<winmd>,Windows.Gaming.Input.GamingInputPreviewContract.winmd;<winmd>,Windows.Gaming.Preview.GamesEnumerationContract.winmd;<winmd>,Windows.Gaming.UI.GameChatOverlayContract.winmd;<winmd>,Windows.Gaming.UI.GamingUIProviderContract.winmd;<winmd>,Windows.Globalization.GlobalizationJapanesePhoneticAnalyzerContract.winmd;<winmd>,Windows.Management.Deployment.Preview.DeploymentPreviewContract.winmd;<winmd>,Windows.Management.Workplace.WorkplaceSettingsContract.winmd;<winmd>,Windows.Media.AppBroadcasting.AppBroadcastingContract.winmd;<winmd>,Windows.Media.AppRecording.AppRecordingContract.winmd;<winmd>,Windows.Media.Capture.AppBroadcastContract.winmd;<winmd>,Windows.Media.Capture.AppCaptureContract.winmd;<winmd>,Windows.Media.Capture.AppCaptureMetadataContract.winmd;<winmd>,Windows.Media.Capture.CameraCaptureUIContract.winmd;<winmd>,Windows.Media.Capture.GameBarContract.winmd;<winmd>,Windows.Media.Devices.CallControlContract.winmd;<winmd>,Windows.Media.MediaControlContract.winmd;<winmd>,Windows.Media.Playlists.PlaylistsContract.winmd;<winmd>,Windows.Media.Protection.ProtectionRenewalContract.winmd;<winmd>,Windows.Networking.NetworkOperators.LegacyNetworkOperatorsContract.winmd;<winmd>,Windows.Networking.XboxLive.XboxLiveSecureSocketsContract.winmd;<winmd>,Windows.Perception.Automation.Core.PerceptionAutomationCoreContract.winmd;<winmd>,Windows.Security.EnterpriseData.EnterpriseDataContract.winmd;<winmd>,Windows.Security.ExchangeActiveSyncProvisioning.EasContract.winmd;<winmd>,Windows.Storage.Provider.CloudFilesContract.winmd;<winmd>,Windows.System.Profile.ProfileRetailInfoContract.winmd;<winmd>,Windows.System.UserProfile.UserProfileContract.winmd;<winmd>,Windows.System.UserProfile.UserProfileLockScreenContract.winmd;<winmd>,Windows.UI.ApplicationSettings.ApplicationsSettingsContract.winmd;<winmd>,Windows.UI.Core.AnimationMetrics.AnimationMetricsContract.winmd;<winmd>,Windows.UI.Core.CoreWindowDialogsContract.winmd;<winmd>,Windows.UI.Shell.SecurityAppManagerContract.winmd;<winmd>,Windows.UI.Xaml.Hosting.HostingContract.winmd;<winmd>,Windows.Web.Http.Diagnostics.HttpDiagnosticsContract.winmd;<winmd>,Windows.Embedded.DeviceLockdown.DeviceLockdownContract.winmd;<winmd>,Windows.Networking.NetworkOperators.NetworkOperatorsFdnContract.winmd;<winmd>,Windows.Phone.PhoneContract.winmd;<winmd>,Windows.Phone.StartScreen.DualSimTileContract.winmd;<winmd>,Windows.UI.WebUI.Core.WebUICommandBarContract.winmd" "--ignore=System.IConvertible,mscorlib".
Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
Error: field `System.Numerics.Vector3 Windows.Perception.People.HandMeshVertex::Normal` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
Error: field `System.Numerics.Quaternion Windows.Perception.People.JointPose::Orientation` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
Error: field `System.Numerics.Vector3 Windows.Perception.People.JointPose::Position` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand::UpdateControllerData(UnityEngine.XR.WSA.Input.InteractionSourceState).
Error: field `System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Origin` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update().
Error: field `System.Numerics.Vector3 Windows.Perception.Spatial.SpatialRay::Direction` doesn't exist in target framework. It is referenced from Microsoft.MixedReality.Toolkit.Providers.WindowsMixedReality.dll at System.Void Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityEyeGazeDataProvider::Update().

UnityEngine.Debug:LogError(Object)
PostProcessWinRT:RunReferenceRewriter() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1062)
PostProcessWinRT:Process() (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:217)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)


Visual Studio 2017 errors can be seen here:
(pasting this exceeds the stackoverflow limit of 30000 characters, so I'm providing a pastebin instead)
https://pastebin.com/bx2QA2wL

解决方案

The errors starting with "Reference Rewriter" are benign and can safely be ignored, (tracked by this bug).

It's possible that your SampleScene that you are building is actually empty, in other words has no content. It may be a good idea to try instead to build and deploy the HandInteractionAllExample scene, located at AssetsMixedRealityToolkit.ExamplesDemosHandTrackingScenesHandInteractionExamples.unity.

Otherwise, your steps are looking correct. Please also see this answer for instructions on how to build a UWP using MRTK v2.

这篇关于如何使用适用于 HoloLens 1 的 MRTK v2 RC 构建和部署可工作的统一应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆