Skip to main content
andrewalderete
Participant
April 11, 2024
Solved

Conflict with ManualResetValueTaskSourceCore in latest Oculus XR SDK (com.meta.xr.sdk.core)

  • I'm encountering a type conflict error ("CS0433 The type 'ManualResetValueTaskSourceCore<TResult>' exists in both...") when using the latest version of the Oculus XR SDK package (com.meta.xr.sdk.core).
  • This conflict seems to be between the Oculus SDK's internal use of ManualResetValueTaskSourceCore<TResult> and the version provided by the .NET framework (or another package).

What I've Tried:

  • I've ensured I'm using the latest version of the com.meta.xr.sdk.core package through the Unity Package Manager.
  • I attempted to resolve the conflict by adding a compiler argument specifying the location of the desired Microsoft.Bcl.AsyncInterfaces.dll file within Unity project preferences, but it didn't work.
  • I've explored alternative solutions like namespace aliasing, but unfortunately, modifying the Oculus SDK files directly is not an option as it's a package managed by Unity.
  • I also tried the solution as mentioned in this thread, which solves the error in the editor, but upon APK build it breaks and spits out the same error again.

Impact on Builds:

This conflict with ManualResetValueTaskSourceCore<TResult> prevents successful builds within Unity. The error message "CS0433: The type 'ManualResetValueTaskSourceCore<TResult>' exists in both..." halts the build process entirely.

Someone please help solve this issue... I believe it may be a bug in the most recent SDK release. Thanks!

This topic has been closed for replies.
Answer
April 16, 2024

I was able to fix it by removing Microsoft.Bcl.AsyncInterfaces.dll from the project and reimporting it from NuGet unity plugin 

Not sure why this fixed it but I was able to make a build without errors

5 replies

April 12, 2024

Were you able to find a solution?

andrewalderete
Participant
April 12, 2024

Unfortunately not. I think it's a bug with the SDK release. I am using Unity 2021.3.32 LTS with Net Framework 4.x.. so things should work fine.

Answer
April 16, 2024

I was able to fix it by removing Microsoft.Bcl.AsyncInterfaces.dll from the project and reimporting it from NuGet unity plugin 

Not sure why this fixed it but I was able to make a build without errors

andrewalderete
Participant
April 16, 2024

I also fixed it with a similar procedure. Turned out I had Microsoft.Bcl.AsyncInterfaces.dll Version 8.0.0, and it required 1.0.0. I removed it with the Nuget Unity Plugin, and then re-installed version 1.0.0.

I also changed my API compatibility setting in Project Settings > Player to .Net Standard 2.1 (it was .Net Framework before). I rebuilt and voila, no more errors.

New Participant
May 30, 2024

I have this exact error, but not able to fix it yet. I tried both recommendations and still it doesn't work, do you have any other ideas?