Search Unity

[SOLVED] MonoDevelop-Unity problems with MonoDevelop already installed

Discussion in 'Linux' started by kborch, Jan 1, 2016.

  1. kborch

    kborch

    Joined:
    Aug 3, 2012
    Posts:
    12
    I can't seem to get MonoDevelop-Unity to load my scripts from Unity, and it seems to me to be some kind of conflict between MonoDevelop-Unity and the version of MonoDevelop I already use.

    The following happens when I try to load scripts from Unity:

    - MonoDevelop-Unity comes up, doesn't show my script, but instead displays an error: "Could not load project 'Assembly-CSharp.csproj' with unknown item type '{0CBC6611-F554-0BD0-809A-388DC95A615B}'" (same on every run)

    - Behind that pop-up message is an error dialog that shows "The following add-ins could not be started", listing "MonoDevelop.VersionControl.Git,5.9" oddly it lists this same add-in 3 times.

    - Shortly after MonoDevelop-Unity comes up, my regular MonoDevelop comes up and shows me my Unity script! :rolleyes:

    I am on Debian (sid), my version of MonoDevelop is 5.10, and I have the latest Debian mono-complete installed.

    Also, it's strange because when I call up the Add-in manager from MonoDevelop-Unity it shows Git and SVN addins being installed with version numbers 5.9.6, so wonder why it is complaining!

    I'll attach the full logfile from MonoDevelop-Unity but here are the highlights:

    [...]
    WARNING [2016-01-01 13:49:21Z]: No proxy credential provider was found
    INFO [2016-01-01 13:49:21Z]: Initializing Runtime Mono 4.2.1
    Starting MonoDevelop-Unity
    FATAL ERROR [2016-01-01 13:49:21Z]: A platform service implementation has not been found.
    [...]
    ERROR [2016-01-01 13:49:22Z]: Add-in error (MonoDevelop.VersionControl.Git,5.9.6): Extension node not found or not extensible: /MonoDevelop/Ide/Commands/VersionControl
    Initializing Main Window
    INFO [2016-01-01 13:49:22Z]: Creating DefaultWorkbench
    ERROR [2016-01-01 13:49:22Z]: Add-in error (MonoDevelop.VersionControl.Git,5.9.6): Extension node not found or not extensible: /MonoDevelop/Ide/MainMenu/VersionControl
    ERROR [2016-01-01 13:49:22Z]: Add-in error (MonoDevelop.VersionControl.Git,5.9.6): Add-in could not be loaded: The required addin 'MonoDevelop.SourceEditor2,5.9.6' is not installed.
    [...]
    Marshaling show signal
    ERROR [2016-01-01 13:49:22Z]: An unhandled exception has occured. Terminating MonoDevelop-Unity? False
    [...]
    WARNING [2016-01-01 13:49:22Z]: Could not load project 'Assembly-CSharp.csproj' with unknown item type '{0CBC6611-F554-0BD0-809A-388DC95A615B}'
    ERROR [2016-01-01 13:49:23Z]: iOS USB Error: System.TypeInitializationException: The type initializer for 'MonoDevelop.Debugger.Soft.Unity.Usbmuxd' threw an exception. ---> System.NotSupportedException: Platform not supported
    at MonoDevelop.Debugger.Soft.Unity.Usbmuxd..cctor () <0x408d1370 + 0x0002b> in <filename unknown>:0
    --- End of inner exception stack trace ---


    Thanks for any help! :)
     

    Attached Files:

    Last edited: Jan 1, 2016
  2. kborch

    kborch

    Joined:
    Aug 3, 2012
    Posts:
    12
    I think I solved it!

    I had installed Unity with the "distro-agnostic" shell script, not the Ubuntu deb, so it was running from a random subdir to my download dir. I decided I wanted to put it in /opt/Unity which meant sudo copying. As a consequence of this, all the copied files are now owned by the root user instead of my local user. The shell installer does require sudo, but the unpacked files are still owned by the local user.

    Anyways, after fixing a small problem with a missing setuid bit on chrome-sandbox it seems to work! :D

    Specifically, when I open a script from the Unity editor, MonoDevelop-Unity opens the script with no errors and my regular MonoDevelop does not interfere.

    The only thing that seems weird to me, being a complete Unity noob, is that if I try to build or run the script from MonoDevelop-Unity I get lots of errors about missing basic System.[Type] definitions, but as long as I just save and run from the Unity editor it seems to work great. Is this normal behavior?

    Unity still runs as my local user even though it is owned by root, and so far I have not experienced any problems like being unable to write to files because they are not owned by me -- knock on wood! :D
     
  3. masterchop

    masterchop

    Joined:
    Oct 9, 2015
    Posts:
    39
    Yes, same on my side Mono develope provides alot of error but still works if you save and run from unity. you can press play to debug directly from unity.
     
  4. weeza

    weeza

    Joined:
    Mar 15, 2013
    Posts:
    6
    I had this error with the build-in mono dev of last few version of Unity on OSX.

    To solve it: Add-in manager -> Language bindings -> Enable C# binding
     
    Tog2 likes this.
  5. merlinjan

    merlinjan

    Joined:
    Sep 19, 2012
    Posts:
    3
    With the new security req. in Visual studio 2015 - I also ran into the problem- solved it by running Unity as a administrator ;)
     
    njerzeyy likes this.
  6. clamum

    clamum

    Joined:
    May 14, 2017
    Posts:
    61
    After adding a brand new script and writing a simple C# statement in it (the class name and filenames match; I'm a .NET dev by profession so I'm not a total noob), I'm getting the "Please fix compile errors before creating new script components" within Unity when trying to drag the script onto my object. I also see the "No MonoBehavior scripts in the file, or their names do not match the file name" message in Unity.

    I've Googled and nothing has helped and I just realized I wasn't running Unity as Administrator (I'm using Windows 10) but that hasn't seemed to work either. I was sure that would fix it.

    Ugh. Any suggestions? I'm brand new to Unity and following along to the "Unity Game Development" course on Udemy.

    I've tried using both VS 2017 Community and MonoDevelop. You can tell VS is in Admin mode cause it has "(Administrator)" in the titlebar but Unity does not. But I am right-clicking and running as Admin.

    Untitled-1.png
     
    Last edited: May 14, 2017
  7. kaskiU

    kaskiU

    Joined:
    Aug 6, 2013
    Posts:
    50
    Try to rename your class (and filename) "Object" to something else.