Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • 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 /
  • Help Room /
avatar image
0
Question by gabosgab · Sep 05, 2018 at 02:16 AM · buildeditor-scriptingbuild-errorwindowsbatchmode

The Assembly UnityEditor is referenced by Assembly-CSharp-firstpass ('Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll'). But the dll is not allowed to be included or could not be found.

I'm getting an error when I'm building using batch mode only and not when compiling using the Editor. Running Build -> Steam Full from the editor works just fine and compiles ok, but running in batch mode does not.

The odd issue about this error is that Assembly-CSharp-firstpass.dll is supposed to reference UnityEngine and the fact it's complaining about it seems like a bug. I used ILSpy to examine the binary from the build in editor that succeeds and it's referencing UnityEditor as expected.


Exception in Log File

 ArgumentException: The Assembly UnityEditor is referenced by Assembly-CSharp-firstpass ('Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll'). But the dll is not allowed to be included or could not be found.
   at UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2[TKey,TValue] cache, UnityEditor.BuildTarget target) [0x00255] in C:\buildslave\unity\build\Editor\Mono\AssemblyHelper.cs:155 
   at UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) [0x0001e] in C:\buildslave\unity\build\Editor\Mono\AssemblyHelper.cs:195 
 UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)
 UnityEditor.BuildPipeline:BuildPlayerInternal(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline.bindings.cs:359)
 UnityEditor.BuildPipeline:BuildPlayer(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline.bindings.cs:254)
 UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline.bindings.cs:237)
 UnityEditor.BuildPipeline:BuildPlayer(EditorBuildSettingsScene[], String, BuildTarget, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPipeline.bindings.cs:220)
 Build:BuildSteamFull() (at Assets\Editor\Scripts\Build\Build.cs:113)



Command to Build Project

 "C:\Program Files\Unity-2018.2.6f1\Editor\Unity.exe" -quit -batchMode -executeMethod Build.BuildSteamFull -logFile ..\Bin\build.log -nographics -outputDir "..\Bin"



The Function To Build The Client

 [MenuItem("Build/Steam Full")]
     public static bool BuildSteamFull()
     {
         string outputFile = GetOutputFile(BuildPlatform.Steam);
         EditorBuildSettingsScene[] scenes = GetFullPlaylist();
         PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, "STEAM;STEAMWORKS_WIN;UNITY;__MEGASPLAT__;VEGETATION_STUDIO;CTS_PRESENT;UNITY_POST_PROCESSING_STACK_V2");
         BuildReport report = BuildPipeline.BuildPlayer(scenes, outputFile, BuildTarget.StandaloneWindows64, BuildOptions.None);
         if (!Build.DidBuildFail(report))
         {
             return false;
         }
         CopyStaticFolderToOutput(Path.GetDirectoryName(outputFile));
         return true;
     }



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
0

Answer by KadenBigBox · Nov 14, 2018 at 01:04 AM

Make sure your SetScriptingDefineSymbolsForGroup is setting the proper symbols.

If a symbol is missing, it might fail to compile and give the error "ArgumentException: The Assembly UnityEditor is referenced by " which is misleading.

We were getting that error and we had no idea why, but it turned out it was indirectly caused by Microsplat because we only had the "MICROSPLAT" symbol, when we also needed "MICROSPLAT_DETAILRESAMPLE". After adding that, everything worked as expected.

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.

Follow this Question

Answers Answers and Comments

172 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 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

Score counting works in editor but not when I build it! 0 Answers

compareTag function not working in build version 0 Answers

Build vs Play Mode Disparity,"Play" mode works fine but the Build has missing functionality 0 Answers

Can't create a build in Unity from ubuntu 0 Answers

Build EXE - Crashes 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges