Error CS0117: 'BuildTargetGroup' does not contain a definition for 'VisionOS'

Installing XR Plug-in Management will install version 4.4.1 which added support for VisionOS. Unfortunately it will brick your project when you do it because I get the following error.

Library\PackageCache\\Editor\Metadata\KnownPackages.cs(12,70): error CS0117: ‘BuildTargetGroup’ does not contain a definition for ‘VisionOS’

Any thoughts on this?

1 Like

Just wanting to confirm but which version of Unity are you using?

I’ll have to ask about the plugin but this doesn’t surprise me.

Did you install an experimental package?

You may have to install an openxr plugin specifically to get it to behave which is an experimental plugin.


I enabled to search for experimental packages in package manager. But that’s not where this comes from. If you start a new project and click on the install XR Plug-in Management button it will install version 4.4.1 and then this error occurs. Removing this package will remove the error.

I have this same error. Digging in, there was an update on January 12 to 4.4.1. The notes say "Added Apple visionOS XR provider to the list of known packages. This would be when Unity borked their plug-in, methinks. Unfortunately, I don’t see a way in package manager to load up 4.4.0.

I am able to install 4.4.1 in an older project of mine 2022.3.14f1. I’m also using 2023.2.6f1. Going to try the previous 2023 version and see if that hits.

Edit: Unity released 2023.2.7f1 since yesterday. Didn’t help. I decided to go with the 2022 LTS branch for now. Will see how that fits with the rest of the course.

I had a look this morning and couldn’t see the upload. Sometimes there is a delay but can you try again.

I’m not following you. Which upload should we try again?

So sorry, I Posted in the wrong place. Too many browser tabs :smiley:

I too am running into this problem on unity 2023.2

Someone shared this on discord it is a bug in the unity package.

.Out of curiosity, are you using 2023? On a Mac? I am using 2023 (PC) and ran in to this. You have to downgrade. Edit your Packages/manifest.json and change the package version back to 4.4.0:

 "": "4.4.0",

That makes sense, I too am running into the same issue after importing XR Interaction Toolkit:

Library\PackageCache\\Editor\Metadata\KnownPackages.cs(12,70): error CS0117: ‘BuildTargetGroup’ does not contain a definition for ‘VisionOS’.

On another related topic, when I follow the instructions to import XR, I am NOT given the second prompt of selecting Initialize XR on Startup. Any idea why and if it is related to the current issue of this thread?

1 Like

If you imported 4.4.1 then edited the file and reinstalled as 4.4.0,it may already be enabled.

This may be a non issue. Try the sample level and if that works, you are good to go.

1 Like

I did manage to figure it out, thanks.

1 Like

Privacy & Terms