Cannot build the generated Visual Studio project. Unity gives no (unexpected) errors, but when building the project using the .NET scripting backend it gives an exception:
1> Failed to fix references for method System.Collections.Generic.List`1<System.Type> Microsoft.MixedReality.Toolkit.Utilities.AwaiterExtensions/CoroutineWrapper`1::GenerateObjectTrace(System.Collections.Generic.IEnumerable`1<System.Collections.IEnumerator>)
1> Failed to fix references for type Microsoft.MixedReality.Toolkit.Utilities.AwaiterExtensions/CoroutineWrapper`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)
Steps to reproduce the behavior:
I expect the project to build.
If applicable, add screenshots to help explain your problem.
Can you retest with the latest RC 2 (released ysterday) please
I retested, and have the same problem on the empty project with just the Foundation and Examples on RC2.
Same issue, Hololens 1
Does this also happen if you have C# projects enabled?
Easiest workaround is to target Windows version 15063 as min version (instead of 16299 or higher). Another workaround involves editing the project file by hand.
I'm following up with .NET folks at Microsoft to see if they can fix it on their end. If not, I'll change the project generation on Unity side to include the workaround I posted in the thread.
Easiest workaround is to target Windows version 15063 as min version (instead of 16299 or higher). Another workaround involves editing the project file by hand.
I'm following up with .NET folks at Microsoft to see if they can fix it on their end. If not, I'll change the project generation on Unity side to include the workaround I posted in the thread.
Hi, I'm running into this issue as well and I'm wondering if there's any updates on this as it is slowing down our iteration workflow by quite a lot.
I do have something that works. I put it as an answer here: https://stackoverflow.com/questions/56575926/running-mrtk2-project-gives-failed-to-resolve-system-reflection-bindingflags
After this, it all runs fine. Only need to do this to the project file when you're making a new build. Building on top of an existing build doesn't change this project file.
Most helpful comment
See this: https://forum.unity.com/threads/error-while-building-uwp-app-with-min-platform-version-10-0-16299-0.685918/
Easiest workaround is to target Windows version 15063 as min version (instead of 16299 or higher). Another workaround involves editing the project file by hand.
I'm following up with .NET folks at Microsoft to see if they can fix it on their end. If not, I'll change the project generation on Unity side to include the workaround I posted in the thread.