Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

MonoDevelop-Unity 6.x Preview Builds

Discussion in 'Experimental Scripting Previews' started by lukaszunity, May 21, 2017.

  1. lukaszunity

    lukaszunity

    Administrator

    Joined:
    Jun 11, 2014
    Posts:
    461
    Important Update

    Starting in Unity 2018.1 we are no longer shipping MonoDevelop-Unity with Unity. There will be no further updates to this thread.

    https://blogs.unity3d.com/2018/01/0...r-monodevelop-unity-starting-in-unity-2018-1/

    Original Post:

    We are releasing preview builds of MonoDevelop-Unity 6.x for early testing.

    These builds can be used for code editing and debugging with both the Unity .NET 2.0 and the .NET 4.6 preview runtime.

    There has been no QA pass on these builds and expect early and experimental build quality.

    We will not necessarily ship MonoDevelop 6.x with Unity, it is likely that we will ship MonoDevelop 7.x instead. Previews builds of MonoDevelop 7.x will be made available at a later time.

    Feel free to provide any kind of feedback you might have on these builds.

    Download

    Installation
    • macOS:
      • Mount the .dmg.
      • Copy MonoDevelop.app to your disk
      • Unmount the .dmg.
    • Windows:
      • Right click the zip file, select "Properties" and then click "Unblock".
      • Unpack the zip to your disk.
      • Might be required to install GTK# using GTKSharp/gtk-sharp.msi (Only once).
    • In Unity:
      • Open Preferences and change the External Script Editor path to point to MonoDevelop.exe (Windows) / MonoDevelop.app (macOS).
    Release notes

    Preview 1:
    • MonoDevelop 6.3.0 with latest debugger client changes from MonoDevelop 7.x (aka Visual Studio for Mac)
    • Debugger client patches to make it work with .NET 4.6 runtime
    Minimum Requirements
    Unity patch releases are available here : https://unity3d.com/unity/qa/patch-releases

    Not supported
    • Opening and building UnityScript/Boo projects.
    Source code repositories
     
    Last edited: Mar 6, 2018
    Gold_Rush, slice3d, MrDude and 3 others like this.
  2. united-y0n3t4n1

    united-y0n3t4n1

    Joined:
    Oct 31, 2016
    Posts:
    1
    Hi, thanks for the effort! So far it's working fine with 2017.1.0f3.
    The code formatting settings sometimes won't be preserved when I changed multiple checkboxes (but it may have something to do with the plist files from the older version).
     
  3. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    139
    Opening a script from Unity always opens a new instance of MD6. Also, MD6 does not open the script which you double clicked on in the Unity editor. OS is Windows 10.

    I installed this preview of MD6 by renaming the folder of Unity's shipped MD to "MonoDevelop-factory" and placed the preview MD6 into "MonoDevelop", so Unity thinks it's the standard MD.
     
  4. decitrig

    decitrig

    Joined:
    Aug 20, 2017
    Posts:
    1
    Just installed & tried this. When running unit tests in MonoDevelop I get the following error (and tests don't run):

    Code (csharp):
    1. Unhandled Exception: System.TypeLoadException: Could not load type 'NUnit.Engine.IExtensionService' from assembly 'nunit.engine.api, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb'.
    2.    at NUnit.Engine.TestEngine.Initialize()
    3.    at NUnit.Engine.TestEngine.NUnit.Engine.ITestEngine.get_Services()
    4.    at NUnit3Runner.NUnitTestRunner.Initialize() in C:\Users\Lukasz\code\unitytech\monodevelop\main\src\addins\MonoDevelop.UnitTesting.NUnit\NUnit3Runner\NUnitTestRunner.cs:line 57
    5.    at NUnit3Runner.NUnitTestRunner..ctor(RemoteProcessServer server) in C:\Users\Lukasz\code\unitytech\monodevelop\main\src\addins\MonoDevelop.UnitTesting.NUnit\NUnit3Runner\NUnitTestRunner.cs:line 51
    6.    at NUnit3Runner.Application.Main(String[] args) in C:\Users\Lukasz\code\unitytech\monodevelop\main\src\addins\MonoDevelop.UnitTesting.NUnit\NUnit3Runner\Program.cs:line 38
    7. The application exited with code: -532462766
    8. Unhandled Exception: System.TypeLoadException: Could not load type 'NUnit.Engine.IExtensionService' from assembly 'nunit.engine.api, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb'.
    9.    at NUnit.Engine.TestEngine.Initialize()
    10.    at NUnit.Engine.TestEngine.NUnit.Engine.ITestEngine.get_Services()
    11.    at NUnit3Runner.NUnitTestRunner.Initialize() in C:\Users\Lukasz\code\unitytech\monodevelop\main\src\addins\MonoDevelop.UnitTesting.NUnit\NUnit3Runner\NUnitTestRunner.cs:line 57
    12.    at NUnit3Runner.NUnitTestRunner..ctor(RemoteProcessServer server) in C:\Users\Lukasz\code\unitytech\monodevelop\main\src\addins\MonoDevelop.UnitTesting.NUnit\NUnit3Runner\NUnitTestRunner.cs:line 51
    13.    at NUnit3Runner.Application.Main(String[] args) in C:\Users\Lukasz\code\unitytech\monodevelop\main\src\addins\MonoDevelop.UnitTesting.NUnit\NUnit3Runner\Program.cs:line 38
    14. The application exited with code: -532462766
     
  5. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Hey there. Not sure if I should post this here or with MonoDev because they list the latest version as 6.1 and the one I downloaded says "MonoDevelop-unity" and is version 6.3 so it seems yours is ahead of theirs... thus my reasoning for posting here.

    Yeah, man, I found a DOOZY of a bug in (at least) the Mac version. If you update an existing parameter using autocomplete it overwrites anything that comes after it and if the new parameter is long enough it will even overwrite the new line character and start overwriting the code on the next line also.

    I.e if you have this:
    Code (csharp):
    1. Foo(bar.x);
    2. SomeNewFunct();
    then all you need to do is delete the . then retype the . to bring up the autocomplete box. Select "Superman" and you are left with the following:
    Code (csharp):
    1. Foo(bar.SupermanNewFunct();
     
  6. lukaszunity

    lukaszunity

    Administrator

    Joined:
    Jun 11, 2014
    Posts:
    461
    Thanks for the feedback. We will update this thread once we have news to share.
     
  7. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Thanks man. I was just about to come look if there is a new one! :D

    I have some extra info to add to that report of mine to help you fix the issue.
    when you want to replace anything on the right hand side of the period, if you use the DELETE key to get rid of one or more characters before accepting the code completion option, the above error happens. If you use the BACKSPACE key right before you use the code completion it inserts the code just fine (even though it doesn't actually "complete" the word but just inserts the text in front of whatever is already there. i.e. superman backspace on the s, return to confirm and you have supermanuperman)

    Basically what it boils down to is if you want to use auto complete, make sure you erase the entire word on the right and make sure your last character was the backspace key.

    Hope that helps. :)

    EDIT:
    Wow... I just noticed the distinction here... If you use the backspace before accepting auto complete then text is INSERTED when you hit return. If you use the delete button then text is OVERWRITTEN. Lol... this reminds me of the old days of DOS when I had a button to select insert or overwrite mode. lol. Haven't use it in forever... don't even know if that is still a thing... :D
     
    Last edited: Sep 7, 2017
  8. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    P.s. I want to win a T-shirt in 4XL. Do I qualify for finding bugs in MonoDev? :p I've come across a few doozys!

    Like this one...
    Screen_Shot_2017-09-04_at_22.58.27.png
    Notice how it is instructing me to REMOVE the return statement from my function :O WTF?
    Maybe it noticed I typed "false" where I should have typed "true"? :p But yeah, it sees the (null == stat) part as returning a bool value already and thus everything after it is redundant code (???) and therefore the entire return statement should be deleted from the function completely (?!?!?!?) 0.o Okaaaaayyyy...

    In order for me to fix this issue what I had to do was select text in another part of the script and copy it into memory and... nothing. That was it. Problem solved.

    Had a few more such odd errors where the error (sometimes just warnings, sometimes errors) went away by me first hovering over it to see the warning, clicking on that line and then using the arrow keys to navigate to another line. Voila. The error is now valid code.
     
  9. Deleted User

    Deleted User

    Guest

    Hello!

    I've tried everything but I can't get this working.
    Any time I open any project, even empty project with one empty .cs file. I get this error.

    upload_2017-9-10_14-31-46.png

    Is there something I can do?

    I really like monodevelop so I'm eager to see what features the new version has. please help !
     

    Attached Files:

  10. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Oh no.... It seems there simply is no more hope for having a decent IDE for Mac. So sad :(

    I got fed up with the MonoDevelop Beta overwriting my code on the next line whenever I used code completion so I said "Screw it" and updated Visual Studios for Mac. "Visual Studio" being the new way to spell "Xamarin" since Visual Studio for Mac has nothing to do with Visual Studio at all and is just a rebranding of Xamarin... Do I recall correctly that Xamarin is in itself just a rebranding of MonoDevelop? ...thus making Visual Studio a rebrand of a rebrand of MonoDevelop... Do I have this right?

    It seem so because Visual Studio for Mac has the exact same bug that I reported earlier about code completion deleting whatever comes after it even if it means deleting code on the next line.

    A friend of mine told me he once installed a VM, Installed Windows and then Visual Studio just so he could code in the REAL Visual Studio while coding for Unity on a Mac. Is that seriously the road we are gonna have to take to get a decent IDE for Mac? Install Windows in a VM and get a decent IDE for Windows and THAT is how we code on Macs now? Seriously?

    That absolutely blows :(
     
  11. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    MonoDevelop is an open source project. Xamarin Studio was Xamarin's branch of MonoDevelop, and that's the product that's been rebranded as "Visual Studio for Mac".

    Have you tried Visual Studio Code? It's cross platform and apparently lightweight. And, yes, it's a completely different product that has nothing to do with the other Visual Studios. Because Microsoft can't name things.
     
  12. MadWatch

    MadWatch

    Joined:
    May 26, 2016
    Posts:
    112
    Is the REST API still being worked on ? Is it available already ?
    I fond some code here that seems to make use of it. But it doesn't look like it works with current Unity projects.
     
  13. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    I seem to recall trying something by that name a while back but I didn't like it for some reason... Will look for a link ant try again. Thx.
     
  14. Jay-Pavlina

    Jay-Pavlina

    Joined:
    Feb 19, 2012
    Posts:
    195
    Use Project Rider. It's amazing.
     
  15. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Sounded good till I noticed the $hundreds per year price tag... Project Rider costs more than Unity :O
    I think I'll just reach to the right and press the power button on the PC and use Visual Studio. Cheaper that way XD
    But thanks for the suggestion :D
     
    Last edited: Oct 25, 2017
  16. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    I've just tried this as a fix for built-in Monodevelop 2nd monitor crash on High Sierra and it worked.

    So far it seems to be working fine with 5.6.3p4 except it doubles the size on disk (671.9mb)...
     
  17. sngdan

    sngdan

    Joined:
    Feb 7, 2014
    Posts:
    1,154
    I can highly recommend script inspector 3 (asset store)

    It has a decent price tag and is super fast. Misses maybe 1-2 features but you will quickly be over it...its a time saver
     
    Flipbookee likes this.
  18. HectorFPi

    HectorFPi

    Joined:
    Jun 6, 2011
    Posts:
    10
    Hi,

    I have the same problem and for the moment is impossible for me to debug selecting .Net 4.6 compatibility mode :'(
    I'm working with Unity 2017.2

    Thanks in advance
     

    Attached Files:

  19. redmugstudios

    redmugstudios

    Joined:
    Dec 21, 2016
    Posts:
    60
    I'm having the same error. Any suggestions on how to fix this?
    Using Unity 2017.2
     
  20. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
    Is there an update on this? We're in the process of evaluating Mac IDE options. Are you still planning on shipping Visual Studio as the next IDE? The concern is that I work for a pretty large company and we can't use the community edition license. Will you have a different license agreement for Visual Studio than the community version? If not, are you planning on a MonoDevelop 7.x even though Xamarin is now owned by Microsoft?
     
  21. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    Does Visual Studio even work on Mac? There's "Visual Studio for mac", but that's just Xamarin Studio aka. MonoDevelop. Or are you running it through Vine?

    Unity has earlier specifically said that they'll keep supporting MonoDevelop because of their large Mac userbase.
     
  22. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
    Based on my understanding since Microsoft bought Xamarin, they repurposed the Mac version of Xamarin Studio to be Visual Studio for Mac. If MonoDevelop 7.x is now Visual Studio for Mac, my interpretation would be that it falls under the same license agreement as Visual Studio for Windows does (in terms of the community edition). Which unfortunately, my current company doesn't qualify for. So if Unity is going to package the community edition with the community edition license, we'll need to start looking elsewhere for an IDE (such as Rider).
     
  23. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    MS now have 2 official apps for Mac.
    Visual Studio Code and Visual Studio for Mac.

    I quit trying to use latter because it was riddled with the same bugs that I found in the latest MonoDevelop-Unity beta. You have no idea how annoying it is to always be mindful of whether you use backspace or delete before using autocomplete and always living in fear of having your code deleted by it...

    Currently I am using Unity's custom beta version as the 2017.1 shipped version did not support C#6. I am curious to see if the one that shipped with 2017.2 does and to see if that is more stable. The Unity version Beta is super strict on syntax, though. Super strict. It doesn't even allow you to do a search for text within a string without adding in the culture check that I didn't even knew was a thing before it started moaning about me not using it... Buggy as hell but with such strong syntax rules I am justifying it's use on the fact that I believe it makes my code better. Also, because of that strong syntax checking it identified a bug in my code before I had my first system meltdown because of it...
    Code (csharp):
    1. static Foo _instance;
    2. static public Foo Instance { get {
    3.     if (null == Instance) {
    4.         GameObject go = new GameObject();
    5.         _instance = go.AddComponent<Foo>();}
    6.     return _instance; } }
    I'm sure I am not the first person to accidentally create the error on line 3 and end up killing my system when I ht Play. MonoDevelop-Unity pointed out this bug to me as soon as I made it. Colour me impressed. :D

    Visual Studio code I uninstalled in like 30 minutes because it does not have intelisense/code completion and cannot find functions in the unity classes or my own classes within the open project. I could not figure out how to set that up with that massive text file that looked like a JSON file that contains all the settings for the entire app in one single large file... Eww...

    A friend of mine recently started using Rider at work and he says it is worth getting but I can't comment on that because there is no way I am spending $hundreds per year on a bloody text editor so I didn't even bother taking the 30 day free trial since... what would be the point?

    Ps, to answer your question:
     
    Last edited: Oct 19, 2017
  24. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
    Yeah you can get VS Code to work with Unity pretty easily, but there are some quirks about it but intellisense and code completion is definitely functional we have some dev working on it right now.

    My understanding is that MonoDevelop 7.x IS Visual Studio for Mac and thus has the same license agreements for it that Visual Studio does as stated in the first post:
    • MonoDevelop 6.3.0 with latest debugger client changes from MonoDevelop 7.x (aka Visual Studio for Mac)
     
  25. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    It turns out there was a missing step in the installation instructions. They said "Install VS Code, tell Unity to use it as the default editor. Go". They forgot to mention the part where after installing VS Code you first have to install the C# plugin in VS Code.

    Apparently Visual Studio Code supports JavaScript out of the box but NOT C#... cause that makes a whole pile of sense...When one thinks of visual Studio one obviously first thinks of JavaScript. That was my mistake for always associating VS with C++ and C#. [sarcasm alert :p]

    Anyway, after I installed that plugin it now works with Intellisense just fine, supports up to C#7.1 even though Unity doesn't go that far yet, and most importantly, it doesn't have that annoying bug that MonoDevelop has. As Ferazei said, it has it's quirks but nothing unsurmountable.

    A bonus is CodeLens. Wow, how useful that is going to be in that one particular project of mine... Apparently VS users have had this since 2013 and I am only learning of this now. :O Wooooooow...

    So yeah, with Rider being too expensive for me to even consider and the MonoDev variants destroying your code it seems the editor with the crappy settings interface is the clear winner here. I would call VS Code the clear winner for the Mac editor of choice and would cast my vote to make it the new default editor.

    If only they mentioned that C# plugin installation step from the start then I would have been using this since day one (which is when I installed it, actually!) Even the horrible settings system that mortified me has received a more user-friendly update... In fact, it is so customisable that I was able to list my scripts in a smaller font that is readable with my bad eyesight while the actual code uses a different font size more friendly to my eye sight. Now I just have to go test how well these setting changes I made actually improve the bad "smart tabbing" and code formatting etc. If I can get VSCode to emulate the coding experience I have become familiar with while offering me CodeLens, C#7 and no more deleting my code without my say so... then holy moly I think I love this editor! XD Really depressing to learn that i could have been using this from the start if only they had made it more obvious that C# is not supported out of the box...
     
    Last edited: Oct 19, 2017
  26. M_R

    M_R

    Joined:
    Apr 15, 2015
    Posts:
    559
    I am using this preview for a while now.
    I like it better and it supports c# 6 features (that you can enable in Unity without switching to the experimental 4.6 runtime by having a "mcs.rsp" file in Assets/ with
    Code (CSharp):
    1. -langversion:6
    in it.)

    what it annoys me is the fact that it has removed some of the formatting options that I had set on the previous one, such as "one-line property getters / setters" and having attributes in the same line. so it doesn't allow me to write
    Code (CSharp):
    1. [SerializeField] int foo;
    and
    Code (CSharp):
    1. public int Foo { get { return foo; } }
    , instead forcing me to have newlines for everything.
    (actually, any kind of "allow both with or without newlines" option disappeared, replaced by checkboxes so I can either force e.g. braces inline or force them on a new line)
     
  27. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Odd... I never experienced that one before :O My own code is filled with:
    Code (csharp):
    1.  [SerializeField] int foo;
    2. public int Foo => foo;
    3. public int Bar { get; set;} = 0;
    Not getting any errors from that... Seems the bugs are now getting localised to machines also XD

    I am now using VS Code and have only 2 issues with it that really bug me. Also just formatting related:
    1. It doesn't smart indent new lines unless you create the new line from the end of a line with something on it. It's so crazy having all your code perfectly indented and then realising "Oops. I forgot some code above" and suddenly your new code is on column 1. So backspace, return, back in business. Simple but annoying. Still beats having my code deleted.

    2. This one is actually making me consider switching back to MonoDev unless someone can tell me what setting to look for to enable this... Whenever I type "new" and then a space, intelisense has no clue what to do so it just doesn't trigger. I.e.
    "string[] foo = new "... it can't detect that I want to create "new string[]" so it leaves me to complete that myself. This is particularly annoying when I am used to MonoDev completing the right hand side of the "new" for me and now I have to manually write:
    "Dictionary<myEnum, List<tvSomeDataTypeOfMine>> foo = new Dictionary<myEnum, List<tvSomeDataTypeOfMine>>();"
    This one truly makes me miss MonoDev almost enough to take my chances with it deleting my code... :(

    So VSCode is close...almost perfect... but only "almost"... Still thinking I should just move over to the PC and use Visual Studio and be done with it.
     
    Last edited: Oct 31, 2017
  28. M_R

    M_R

    Joined:
    Apr 15, 2015
    Posts:
    559
    I don't get not an error. if I have code formatting enabled, it forces the code to be like
    Code (CSharp):
    1.  
    2. [SerializeField] int foo;
    3.  
    4. int Foo {
    5.     get {
    6.         return foo;
    7.     }
    8. }
    9.  
    7 lines when I want them to be 2

    @ your point 2: I usually write
    Code (CSharp):
    1. var foo = new Dictionary<myEnum, List<tvSomeDataTypeOfMine>>();
    so I only type once anyways
     
  29. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    1. Ohhhhh... yeah, that sucks. I normally turn code formatting off due to former bad experiences with it in MonoDev so that would explain why I never got that. In. my case, if I remember the syntax correctly:
    Code (csharp):
    1. void Foo() { // comment
    2. code();
    3. }
    4.  
    5. was "formatted" into
    6.  
    7. void Foo() //comment {
    8. code();
    9. }
    10.  
    You can imagine how many errors that caused and why I stopped using that feature. code formatting for me, no thank you. What you are telling me is that MonoDev still does a bad job at code formatting and I should continue to avoid using that, K.

    2. That technique won't work when the var is global and you need to initialise it from various methods. Besides, even something simple like a Vector2 or Vector3... it was sooo convenient to have MonoDev complete it for me with just a V or a V and a down arrow :D
    Code (csharp):
    1. var foo;
    2. void Bar() {
    3.    if (x) { Something() }
    4.    else foo = new Dictionary<myEnum, List<Something>>();
    5. }
    Both have Pros and cons, clearly... but I'm still waiting for someone to tell me how to enable that second thing in VSCode and make it the clear winner here! :D

    Anyone?
     
    Last edited: Oct 31, 2017
  30. M_R

    M_R

    Joined:
    Apr 15, 2015
    Posts:
    559
    1. does not happen to me.
    instead, it explodes when I do
    Code (CSharp):
    1. if (
    2.     condition1 &&
    3.     condition2 &&
    4. //    condition3 &&
    5.     condition4) {
    6.     ...stuff...
    7. }
    old version put everything back to one line, ignoring the // commented line

    btw new version seems also bugged when trying to autocomplete attributes
     
  31. VicenteSenger

    VicenteSenger

    Joined:
    Jun 21, 2017
    Posts:
    1
    The dark theme looks so nice. Very appreciated. Thank you.
     
  32. okamoto_tomoyuki

    okamoto_tomoyuki

    Joined:
    Jan 20, 2015
    Posts:
    22
    Forcible solution was written here.
    https://bugzilla.xamarin.com/show_bug.cgi?id=57085

    I copied all dll files under this directory to the directory of the exe file. Then, it worked.
     
  33. okamoto_tomoyuki

    okamoto_tomoyuki

    Joined:
    Jan 20, 2015
    Posts:
    22
    I installed it because I wanted to use the Vi plugin.
    However, neither JustEnoughVi nor XSVim could be installed.
    It is very disappointing.

    Also I could not watch the value of the static variable with debugging.

    Update Dec,16,2017
    JustEnoughVi worked.
    I changed the extension of the add-in mpack file to Zip.
    Then I copied the contents directly into the Addin folder and it worked.
     
    Last edited: Dec 16, 2017