Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

executeMethod class 'PerformBuild' could not be found.

Discussion in 'Editor & General Support' started by dylan.ryan, Jan 15, 2014.

  1. dylan.ryan

    dylan.ryan

    Joined:
    Oct 15, 2012
    Posts:
    29
    Hello, We have been executing our build by command line, and have just upgraded to Unity 4.3.3 from Unity 4.2.2. When we upgraded we are now getting the following error:

    executeMethod class 'PerformBuild' could not be found.
    Argument was -executeMethod PerformBuild.CommandLineBuild


    The class exists, CommandLineBuild is a static method, and the class's location has not changed. Is there something new in 4.3.3. that changed?

    Thank you,
    Dylan
     
    tigerleapgorge likes this.
  2. dylan.ryan

    dylan.ryan

    Joined:
    Oct 15, 2012
    Posts:
    29
    It looks like the problem is if you specify the -buildtarget parameter. I am guessing this was changed in 4.3.3 to run the build target switching first which was causing it to have problems loading the custom -executeMethod class parameter.
     
    tigerleapgorge likes this.
  3. tonyxu123

    tonyxu123

    Joined:
    Apr 8, 2014
    Posts:
    3
    Hi Dylan,

    how did you end up fixing this issue? I am having a similar issue where my class exists but i'm getting

    executeMethod class 'AutoBuild' could not be found.
    Argument was -executeMethod AutoBuild.PerformBuild

    and I didn't specify a build target.

    If you have any insights that would be extremely helpful, thank you!
     
    tigerleapgorge likes this.
  4. aiwo

    aiwo

    Joined:
    Feb 6, 2014
    Posts:
    2
    If someone encounters the same problem here is my suggestion. I've managed to solve this error by adding full namespace to the class name. I.e. UnityTools.Awesome.AutoBuild.PerformBuild
     
    tigerleapgorge likes this.
  5. Killhatch

    Killhatch

    Joined:
    Aug 21, 2012
    Posts:
    4
    Make sure your enclosing class is NOT static!

    I made the mistake of making a public static method inside a public static class.
     
  6. ShadowLiu

    ShadowLiu

    Joined:
    Aug 30, 2012
    Posts:
    17
    However,update to 5.3.4f1 this problem happen again. Anyone help?
     
    tigerleapgorge likes this.
  7. Vitalii_lab

    Vitalii_lab

    Joined:
    Apr 18, 2016
    Posts:
    7
    Yep, i had also faced same issue, but as @aiwo said, use the class name with a namespace - that fixes a problem for me.
     
    Last edited: Apr 18, 2016
    tigerleapgorge likes this.
  8. frank-ijsfontein

    frank-ijsfontein

    Joined:
    Sep 11, 2015
    Posts:
    6
    I had this problem just now on 5.5.0 and it turned out some other classes were missing (forgot to add them to version control). Adding them fixed it. So it was not actually a problem of the buildtarget's class not being there.
     
    tigerleapgorge likes this.
  9. erika-gutierrez

    erika-gutierrez

    Joined:
    Jun 18, 2014
    Posts:
    1
    I have the same problem, any solution?
     
  10. ESG-Steven

    ESG-Steven

    Joined:
    Mar 18, 2015
    Posts:
    38
    Add a namespace to your class (and your execute method cmd param) and make sure it is not static.
    Seems ridiculous but that's what I had to do to make it work, it was no error in my command.
     
  11. g-ericso

    g-ericso

    Joined:
    Mar 27, 2017
    Posts:
    3
    I tried all of above. Nothing works. I am using the latest Unity 2017.2.0.0f3.
     
  12. amynox

    amynox

    Joined:
    Oct 23, 2016
    Posts:
    81
    I'm using Unity 2017.2.0.0f3 and managed to fix the issue like so :

    1 - Your "Build class" should be NOT STATIC
    2 - Add a namespace to your "Build Class" and call it with the full namespace in command line.
    3 - Dont forrget to add -projectPath to your command line

    hop that help ;)
     
    Lone-Coder likes this.
  13. ESG-Steven

    ESG-Steven

    Joined:
    Mar 18, 2015
    Posts:
    38
    I was in the process of making a build pipeline and initially did notice that my default environment had editor/compiler errors in the project when done through the pipeline. Unfortunately, this spits out the error: "executeMethod class 'MyBuildClass' could not be found."

    It's a very misleading error that seems to be the fallback for a number of unrelated issues.
     
    tigerleapgorge and Kanthor like this.
  14. turnipinrut

    turnipinrut

    Joined:
    Oct 27, 2014
    Posts:
    10
    Our build script is static and works fine
     
    tigerleapgorge likes this.
  15. mihakinova

    mihakinova

    Joined:
    Jan 6, 2015
    Posts:
    85
    I had the same problem and the reason it was happening in my case was that our CI didn't checkout binary files from LFS properly (which in turn caused a bunch of compile errors in the editor, which were not shown in the CI log) :(

    Make sure your project can be opened in the Unity editor, and that it compiles properly there.
     
    tigerleapgorge likes this.
  16. AndyLangberg

    AndyLangberg

    Joined:
    Jul 6, 2018
    Posts:
    37
    Just had this problem myself. Important point which no one has pointed out yet: While the class should not be static, the method itself DO have to be static, else you get an error saying it can't find the method within the given class.
     
    tigerleapgorge likes this.