Unity Cloud build is giving me weird errors, referencing classes that are no longer in the project.
Locally it works just fine, both at my computer and at nother dev’s. Also, cloud-building other projects works fine too.
I’ve tried deleting and re-creating the project but nothing changed: I still get those senseless errors.
I’m absolutely clueless about what could I do.
In case it may ring you a bell, here’s part of the error:
2:[Unity]Initialize engine version:5.0.0f4(5b98b70ebeb9)3:[Unity]-----CompilerOutput:-stdout–exitcode:1–compilationhadfailure:True–outfile:Temp/Assembly-CSharp-Editor.dll
4:[Unity]Compilation failed:2 error(s),0 warnings5:[Unity]Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616:MenuItem': is not an attribute class 6: [Unity] /BUILD_PATH/BVR_TEMP_DIR/d20150405-42640-si973w/Library/ScriptAssemblies/Assembly-CSharp.dll (Location of the symbol related to previous error) 7: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
8: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem':isnot an attribute class9:[Unity]Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246:The type ornamespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
10: [Unity] Scripts have compiler errors.
This looks like it’s related to a editor menu which can not be called correclty. Check you editor files which could cause the problems.
If you have deleted files, please try a Clean Build All build to recreate the cached libraries, although this problem should not be related if you already created a new project.
Let us know how it goes!
I’ve commented out the only 1-line /Editor file, but it still gives very weird errors:
1: [Unity] Initialize engine version: 5.0.0f4 (5b98b70ebeb9)
2: [Unity] -----CompilerOutput:-stdout–exitcode: 1–compilationhadfailure: True–outfile: Temp/Assembly-CSharp.dll
3: [Unity] Compilation failed: 2 error(s), 0 warnings
4: [Unity] Assets/sources/Character/Character.cs(10,26): error CS0246: The type or namespace name Interpolable' could not be found. Are you missing a using directive or an assembly reference? 5: [Unity] Assets/sources/Projectiles/Projectile.cs(8,36): error CS0246: The type or namespace name
Interpolable’ could not be found. Are you missing a using directive or an assembly reference?
6: [Unity] Assets/sources/Character/Character.cs(10,26): error CS0246: The type or namespace name Interpolable' could not be found. Are you missing a using directive or an assembly reference? 7: [Unity] Assets/sources/Projectiles/Projectile.cs(8,36): error CS0246: The type or namespace name
Interpolable’ could not be found. Are you missing a using directive or an assembly reference?
8: [Unity] -----CompilerOutput:-stdout–exitcode: 1–compilationhadfailure: True–outfile: Temp/Assembly-CSharp-Editor.dll
9: [Unity] Compilation failed: 2 error(s), 0 warnings
10: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 11: [Unity] /BUILD_PATH/BVR_TEMP_DIR/d20150407-30797-11nm59j/Library/ScriptAssemblies/Assembly-CSharp.dll (Location of the symbol related to previous error) 12: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
13: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 14: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
15: [Unity] Scripts have compiler errors.
16: [Unity] Scripts have compiler errors.
17: [Unity] Initialize engine version: 5.0.0f4 (5b98b70ebeb9)
18: [Unity] -----CompilerOutput:-stdout–exitcode: 1–compilationhadfailure: True–outfile: Temp/Assembly-CSharp-Editor.dll
19: [Unity] Compilation failed: 2 error(s), 0 warnings
20: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 21: [Unity] /BUILD_PATH/BVR_TEMP_DIR/d20150407-30797-11nm59j/Library/ScriptAssemblies/Assembly-CSharp.dll (Location of the symbol related to previous error) 22: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
23: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 24: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
25: [Unity] Scripts have compiler errors.
26: [Unity] Scripts have compiler errors.
27: ! build of ‘default-android’ failed. compile failed
28: Finished: FAILURE
Status: FAILED
Interpolable is a class that really exists and works locally, while MenuItemAttribute is an old class long gone from the project and not referenced anywhere.
They have never been part of the same project together.
I’m baffled.
PS: just in case, I’ve tried to re-download the project from scratch, and it build fine locally. So I confirm it’s a cloud-build problem only.
However, now it gave up the “Interpolable” errors and reverted to the briefer Menu* errors it had before.
Which is odd, since the only change it did since the previous try was upgrading from 5.0.0f4 to 5.0.1f1.
1: [Unity] Initialize engine version: 5.0.0f4 (5b98b70ebeb9)
2: [Unity] -----CompilerOutput:-stdout–exitcode: 1–compilationhadfailure: True–outfile: Temp/Assembly-CSharp-Editor.dll
3: [Unity] Compilation failed: 2 error(s), 0 warnings
4: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 5: [Unity] /BUILD_PATH/BVR_TEMP_DIR/d20150407-30144-1gacf9b/Library/ScriptAssemblies/Assembly-CSharp.dll (Location of the symbol related to previous error) 6: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
7: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 8: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
9: [Unity] Scripts have compiler errors.
10: [Unity] Scripts have compiler errors.
11: [Unity] Initialize engine version: 5.0.0f4 (5b98b70ebeb9)
12: [Unity] -----CompilerOutput:-stdout–exitcode: 1–compilationhadfailure: True–outfile: Temp/Assembly-CSharp-Editor.dll
13: [Unity] Compilation failed: 2 error(s), 0 warnings
14: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 15: [Unity] /BUILD_PATH/BVR_TEMP_DIR/d20150407-30144-1gacf9b/Library/ScriptAssemblies/Assembly-CSharp.dll (Location of the symbol related to previous error) 16: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
17: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 18: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
19: [Unity] Scripts have compiler errors.
20: [Unity] Scripts have compiler errors.
21: ! build of ‘default-android’ failed. compile failed
22: Finished: FAILURE
Status: FAILED
Now that I’ve set up the iOS build too, I can state I get the same error even there.
1: [Unity] Initialize engine version: 5.0.1f1 (5a2e8fe35a68)
2: [Unity] -----CompilerOutput:-stdout–exitcode: 1–compilationhadfailure: True–outfile: Temp/Assembly-CSharp-Editor.dll
3: [Unity] Compilation failed: 2 error(s), 0 warnings
4: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 5: [Unity] /BUILD_PATH/xxxxxx-c18dacdf-ca5b-a08b-a16e-b9a6f0ff418e.54f74a712187c1e732000737.default-ios/Library/ScriptAssemblies/Assembly-CSharp.dll (Location of the symbol related to previous error) 6: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
7: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 8: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
9: [Unity] Scripts have compiler errors.
10: [Unity] Scripts have compiler errors.
11: [Unity] Initialize engine version: 5.0.1f1 (5a2e8fe35a68)
12: [Unity] -----CompilerOutput:-stdout–exitcode: 1–compilationhadfailure: True–outfile: Temp/Assembly-CSharp-Editor.dll
13: [Unity] Compilation failed: 2 error(s), 0 warnings
14: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 15: [Unity] /BUILD_PATH/xxxxxx-c18dacdf-ca5b-a08b-a16e-b9a6f0ff418e.54f74a712187c1e732000737.default-ios/Library/ScriptAssemblies/Assembly-CSharp.dll (Location of the symbol related to previous error) 16: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
17: [Unity] Assets/UnityCloud/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0616: MenuItem': is not an attribute class 18: [Unity] Assets/__UnityCloud__/Scripts/Editor/UnityCloudBuilder.cs(470,10): error CS0246: The type or namespace name
MenuItemAttribute’ could not be found. Are you missing a using directive or an assembly reference?
19: [Unity] Scripts have compiler errors.
20: [Unity] Scripts have compiler errors.
21: ! build of ‘default-ios’ failed. compile failed
22: Finished: FAILURE
Status: FAILED
This error makes no sense to me, and I still have absolutely no clue on what am I supposed to do.
Any help?
Have you ever tried a Clean Build All?
I see you said “I’ve tried deleting and re-creating the project” but do you mean you created a new app in Cloud Build? If that’s the case, you likely have a .gitignore problem or something similar where what’s in your source control isn’t quite what you think. Ensure on a fresh checkout the files which should be gone, are not in your repository at all.
Solved!
The problem was that I had a class named MenuItem
, and since it wasn’t namespaced, it was conflicting with Unity’s class of the same name…
2 Likes