Search Unity

2017.2 - Android - SystemException: Error running gmcs: Cannot find the specified file

Discussion in 'Unity Build Automation' started by Grazer2, Oct 16, 2017.

  1. Grazer2

    Grazer2

    Joined:
    Jun 20, 2011
    Posts:
    86
    Trying to build my game using the cloud build yields the following exception:

    1331: [Unity] Initializing Unity.PackageManager (PackageManager) v2017.2.0 for Unity v2017.2.0f3
    1332: [Unity] System.SystemException: Error running gmcs: Cannot find the specified file
    1333: [Unity] at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0
    1334: [Unity] at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0
    1335: [Unity] at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String fileName) [0x00000] in <filename unknown>:0
    1336: [Unity] at System.Xml.Serialization.XmlSerializer.GenerateSerializers (System.Xml.Serialization.GenerationBatch batch, System.CodeDom.Compiler.CompilerParameters cp) [0x00000] in <filename unknown>:0
    1337: [Unity] at System.Xml.Serialization.XmlSerializer.RunSerializerGeneration (System.Object obj) [0x00000] in <filename unknown>:0 System.SystemException: Error running gmcs: Cannot find the specified file
    1338: [Unity] at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0
    1339: [Unity] at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0
    1340: [Unity] at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String fileName) [0x00000] in <filename unknown>:0
    1341: [Unity] at System.Xml.Serialization.XmlSerializer.GenerateSerializers (System.Xml.Serialization.GenerationBatch batch, System.CodeDom.Compiler.CompilerParameters cp) [0x00000] in <filename unknown>:0
    1342: [Unity] at System.Xml.Serialization.XmlSerializer.RunSerializerGeneration (System.Object obj) [0x00000] in <filename unknown>:0


    Build target platform: Android
    Build engine version:
    2017.2.0f3 (46dda1414e51)

    This error has just showed up with the switch to 2017.2. I have to mention however, that with previous versions there have been other errors (manifest merge problems).

    Any solution for the above? Is it a known issue? Building locally on my PC works fine btw.

    Regards
     
    d1favero likes this.
  2. omerelfassy

    omerelfassy

    Joined:
    Nov 9, 2015
    Posts:
    20
    Same problem here, Same Unity version.

    39: [Unity] Initialize engine version: 2017.2.0f3 (46dda1414e51)
    40: [Unity] System.SystemException: Error running gmcs: Cannot find the specified file
    41: [Unity] System.SystemException: Error running gmcs: Cannot find the specified file

    Edit:
    I've tried to cloud-build another project without IAP and the build succeeded even when the files were missing.

    13: [Unity] Initialize engine version: 2017.2.0f3 (46dda1414e51)
    14: [Unity] System.SystemException: Error running gmcs: Cannot find the specified file
    15: [Unity] at System.Xml.Serialization.XmlSerializer.RunSerializerGeneration (System.Object obj) [0x00000] in <filename unknown>:0 System.SystemException: Error running gmcs: Cannot find the specified file
    23: [Unity] Finished exporting player successfully.
    26: publishing finished successfully.
    27: Finished: SUCCESS
     
    Last edited: Oct 16, 2017
  3. jpmarqu

    jpmarqu

    Joined:
    Sep 30, 2013
    Posts:
    2
    Sam problem here but in iOS. Anyone found a solution for this?
     
  4. boxapixels

    boxapixels

    Joined:
    May 9, 2013
    Posts:
    1
    Same here... Anybody? This is making a massive mess of my schedule.
     
  5. darrensmith

    darrensmith

    Joined:
    Apr 13, 2017
    Posts:
    16
    Same problem here. Does anyone have a solution?

    This happened when I integrated IAP.
     
  6. darrensmith

    darrensmith

    Joined:
    Apr 13, 2017
    Posts:
    16
    UPDATE:
    I was able to get a successful build by doing this:
    1. From cloud build menu, select config
    2. Select Edit Basic Info
    3. Set Cache Library: None
    4. In iOS Production target, edit basic info
    5. Set Always Use Latest 2017.1 (previously set to Always Use Latest 2017.X)
     
  7. Nikolasio

    Nikolasio

    Joined:
    Dec 6, 2014
    Posts:
    59
    I tried the above but still got errors.

    From my log I assume IAP causes problems, I also get errors from my shop system plugin related to IAP.

    I filed a bug report.