• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by justingold · Jul 23, 2020 at 01:10 PM · buildbuild-errorupdate problemcommand linereference assemblies

Command line build fails after updating to Unity 2019.4

I am trying to upgrade a project from Unity 2019.1.13f1 to 2019.4.4f1 and it seems to have gone smoothly when testing in the editor, however, it does not work when I try to build it from the command-line due to missing assembly references. Compiling through command-line is necessary for this project. It needs to build for iOS and Android.

To setup the build, a script is called from the command line as follows:

 ./buildLoader.sh -t IOS

The script is building the project with the following arguments.

 "$UNITY_2019_4_PATH"/Contents/MacOS/Unity \
     -batchmode \
     -quit \
     -nographics \
     -logFile - \
     -silent-crashes \
     -stackTraceLogType Full \
     -disable-assembly-updater \
     -noUpm \
     -buildTarget "$BUILD_TARGET" \
     -projectPath "$(pwd)" \
     -executeMethod BuildLoader"$BUILD_TARGET".init || exit 1

After the commands execute it outputs the log to the console but ends with the line

 error: attach failed: Error 1

The source of the error seems to be that it is missing an assembly reference for a few of the assemblies. One series of errors is related to UnityEngine.UI

 error CS0234: The type or namespace name 'UI' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
 

Another is related to references in Zenject

 Assets/Zenject/OptionalExtras/TestFramework/SceneTestFixture.cs(5,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?)

The project is separated into several assembly definitions, but there were no issues with the .asmdef files previously and the project does work in the editor. I even tried adding a reference to UnityEngine.UI directly into the Assembly Definition References section but this did not do anything.

I've looked around online for answers to similar problems but none of them resolved the issue here. Has anyone run into similar problems when trying to build from command-line or after updating?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by justingold · Aug 04, 2020 at 12:34 PM

The solution to this problem ended up being to remove the -noUpm command-line argument from the build script.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

140 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

iPhone build is a blank scene 0 Answers

Lighting layers error 1 Answer

Android Build 0 Answers

Android - Failed to repackage resources error after installing facebook plugin 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges