Search Unity

Build Error in Monodevelop

Discussion in 'Scripting' started by Blosserdw, Nov 27, 2017.

  1. Blosserdw

    Blosserdw

    Joined:
    Nov 14, 2013
    Posts:
    3
    Hello!

    I'm getting this build error in monodevelop:



    The problem does NOT appear in Visual Studio 2017, but since I use monodevelop for scripting I'm trying to figure out how to address it. The line it happens at has been in the game working fine for a long time so it's obviously something else I've introduced recently. That line is just setting the text color via a function, so it's pretty simple:

    Code (CSharp):
    1. CurrentGameShow.CutoutScoreText.color = GameUtilities.GetColorFromHTMLValue("#6D00FFFF");
    Unfortunately I was in the process of a big integration with another VR device that I'm supporting and can't exactly nail down where I went wrong since I haven't tried to debug in a while.

    I was hoping that someone could point me in the general direction of what this error means and where I can look to find the conflict.

    Thanks for any help!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    What is likely happening is that Monodevelop has lost its mind or corrupted its project file(s) somehow.

    In Unity go to Assets -> Open C# Project to refresh it.

    If that doesn't work, delete the .csproj and .sln and .userprefs files that Unity will recreate, and then do the Assets -> Open C# Project. To be sure, copy the files somewhere else before you delete them, but Unity does not need those files in any case.

    Personally, I never build in Monodevelop: Unity rebuilds everything anyway!
     
  3. Blosserdw

    Blosserdw

    Joined:
    Nov 14, 2013
    Posts:
    3
    Thank you for the suggestions! I did all that, plus deleted Library and obj folders in the project, but still get the same build errors.

    This is kind of a facepalm moment for me, but I was always under the impression that the project needed to be built (or at least it was always the right option to build it) before attaching to the Unity Editor and debugging. Since you mentioned you never build in Monodevelop I just clicked on "Execute" instead of "Build" and was able to hit break points and all normally.

    So I guess I can keep moving forward that way. Is there any situation where that would come back to bite me, or is it alright since Unity is already compiling scripts and stuff when there are changes to them?