After switching VR project to VisionOS platform, I get the error CS0006: Metadata file 'System.ComponentModel.DataAnnotations.dll' could not be found

I have a VR project on Unity 2022.3.5.f1. It builds and runs fine on Quest/Android platform.

But when I switch to visionOS platform, I get the errors:
“error CS0006: Metadata file ‘System.ComponentModel.DataAnnotations.dll’ could not be found”
This breaks Unity completely and I can’t carry on working on the project. But if I switch back to Android plateform, everything works again…
I don’t have this issue on a blank Unit project and visionOS platform…
Can you help please ?

thanks,
diego

So I finally found the issue:
I have a csc.rcp file which references this ‘System.ComponentModel.DataAnnotations.dll’ file which seems to cause the issue.
Removing it resoves all issues…

Hi,

Glad you were able to resolve the issue! If you haven’t already, could you please file a bug on this with any additional details if there are any? Thank you!