Search Issue Tracker
Won't Fix
Votes
1
Found in
5.4.1p4
Issue ID
840287
Regression
No
Building through batch mode causes compiler to fail for the first time if script is deleted and target platform is changed
Steps to reproduce:
1. Extract attached project "unity-delete-script-master.zip"
2. Open "run_test_case.bat" using text editor and set path to your unity installation
3. Run .bat
4. Open _output folder and there should be four log files
5. Open third one: "unity_editor_step_3.log"
6. Search for "compilation failed" and notice that compiling assembly threw an error:
-----CompilerOutput:-stdout--exitcode: 1--compilationhadfailure: True--outfile: Temp/Assembly-CSharp.dll
Compilation failed: 1 error(s), 0 warnings
-----CompilerOutput:-stderr----------
error CS2001: Source file `Assets/MyFolder/TestScript_toDelete.cs' could not be found
-----EndCompilerOutput---------------
- Finished compile Library/ScriptAssemblies/Assembly-CSharp.dll
error CS2001: Source file `Assets/MyFolder/TestScript_toDelete.cs' could not be found
Compilation failed: 1 error(s), 0 warnings
Note: build succeeds because after failed compilation code is compiled three more times. Problem is that because of this error build machines might think that build failed.
Reproduced with: 5.3.6p7, 5.4.2f1, 5.5.0b7
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Dragon Crashers] Build fails in U6
- [Dragon Crashers] 4 Shader error messages on import
- [Dragon Crashers] Readme text is white on light grey
- Cursor stays in front of the first character when entering text in the TextMeshPro field
- Searching in Hierarchy causes unwanted component calls
artofcode
Apr 09, 2017 21:25
When building using batchmode / BuildPipeline.BuildPlayer and a new class (in a new file!) has been created and referenced in existing files, it also fails.
It succeeds the second time it's run.
Simply running Unity in the same project location once before actually running and building works as a temp. work-around however.