error CS0117: 'BuildPipeline' does not contain a definition for 'GetBuildTargetName'

Hello community ! I’m on a AR project in Unity ( I try to do a mobile application for iOS using the AR camera to see 3D objects).

My unity version is 2019.4.12f1.
When I create a 3D project I download these packages :
-AR Foundation
-XR Plugin Management
-AR Kit XR Plugin. (the one that make my problems happen)

My console says : Library/PackageCache/com.unity.xr.management@3.2.17/Editor/XRGeneralBuildProcessor.cs(39,52): error CS0117: ‘BuildPipeline’ does not contain a definition for ‘GetBuildTargetName’

I searched help on lots of forum but I can’t solve this error. Some solutions were given and worked for some people like “Reset the packages on Help” and others…

Can anyone help me ? Thanks !!!

2 Likes

Had the same problem and found the solution here:

Had to remove AR Foundation in the Package Manager first, then downgraded XR Plugin Management to 3.2.16, then reinstalled AR Foundation.

Also had to downgrade AR Foundation and ARKit XR Plugin, both to version 4.1.1, as recommended in the thread linked above!

5 Likes

Additionally, your Unity version must be at least 2019.4.15f1. :slight_smile:

6 Likes

@TreyK-47 coming in hot with that Unity version tip! Thanks.

1 Like

This issue also happened for me on Unity 2020.1.4f1. The problem fixed itself when I updated to Unity 2020.1.17f1

2 Likes

Help-> Reset Packages to defaults worked for me

9 Likes

For me this bug comes with upgrading Oculus XR Toolkit from 1.4.3 to 1.8.1 because I wanted support for Oculus Quest 90fps. It invisibly brought update of XR Plugin Management from 3.2.16 to 4.0.1. My solution was to reset to last working commit, delete library and then install first version of Oculus XR Toolkit that brings 90fps support but does not require XR Plugin Management update (in my case Oculus XR Toolkit v 1.7.0). I have simply tried resist updating Unity to the last moment as it may bring bunch of new problems :slight_smile:

1 Like

ARFoundation and XR Plugin management works fine but when i add ARCore XR plugin then erros occur

Hi! I’m encountering the same issue @khanhabib is having. As soon as I add ARCore XR Plugin that error occurs.

2 Likes

Hi @khanhabib ,

I found a solution myself. I ended up downgrading ARFoundation, ArKir, ARCore to 4.1.1 and XR Plugin Management to 3.2.16.

Remember to change ARCore, ARKit and AR Foundation before downgrading XR PluginManagement, as it is a dependency.

4 Likes

I find it pretty sad that this error still happens on a fresh project install using the templates.

Unity 2020.1.7f1
AR Template

Compiler error → ‘BuildPipeline’ does not contain a definition for ‘GetBuildTargetName’

Help → Reset Packages

Install → XR Plugin 3.2.17
Install → AR Foundation 3.1.10
Install → ARCore 3.1.10

Compiler Error → ‘BuildPipeline’ does not contain a definition for ‘GetBuildTargetName’

Is downgrading really the only way to resolve this template error?

Tried updating the project to 2021.1 and it immediately crashed and had to enter Safe mode. From there tried resetting all packages to default and only was able to get Unity to compile after deleting the Examples and XR Folders.

Using 2021 from a fresh install I was finally able to use the AR Template from scratch and compile a fresh project.

Same problem in 2019 LTS.
2020 LTS works well.

these issues doesnt occur in unity 2020.

Unity 2019.4.13f1, XR Management Plugin 3.2.16, AR Foundation 4.1.1, and AR Core XR Plugin 4.1.1 complies for me for anyone having trouble with AR core package.

Your tip solved the problem in my case, thanks!

1 Like