我正在尝试将我的项目从 Unity 2017 LTS 移植到 2018 LTS 和 MRTK2。在我尝试在 HoloLens 1 模拟器上运行该项目之前,一切都很顺利。
我收到以下错误:
1> System.Exception: Failed to resolve System.Reflection.BindingFlags
1> at Unity.ModuleContext.Retarget(TypeReference type, GenericContext context)
1> at Unity.ModuleContext.Retarget(MethodReference method, GenericContext context)
1> at Unity.FixReferencesStep.Visit(MethodDefinition method, GenericContext context)
1> at Unity.FixReferencesStep.Visit(TypeDefinition type)
1> at Unity.TypeDefinitionDispatcher.DispatchType(TypeDefinition type)
1> at Unity.TypeDefinitionDispatcher.DispatchType(TypeDefinition type)
1> at Unity.TypeDefinitionDispatcher..ctor(ModuleDefinition module, ITypeDefinitionVisitor visitor)
1> at Unity.FixReferencesStep.ProcessModule()
1> at Unity.ModuleStep.Execute()
1> at Unity.FixReferencesStep.Execute()
1> at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext)
1> at Unity.Operation.Execute()
1> at Unity.Program.Main(String[] args)
搜索这个错误什么也没给我,我没有更改 Unity 构建的项目。我正在运行它Debug
并为x86
. 我正在通过普通的 Unity Build 窗口进行构建。
使用Minimum Platform Version 10.0.17134.0
和Target SDK Version 10.0.18362.0
新的空 Unity 项目也会发生这种情况,构建示例也会出现此错误。