- Home /
I can't open boo or js scripts in Monodevelop with a default install?
Brand new user to Unity here.
I've just installed Unity 4.5.5.f1 on Windows 7, and am trying to follow the roll-a-ball tutorial. I'm not a fan of C# so I was trying to use either js or boo, but they do not seem to be working with the default installation of monodevelop-unity.
In a brand new, blank project, I create a brand new boo script, and attempt to open it for the first time, and get the following error from monodevelop.
An error has occurred
The file 'D:\Users\Public\Documents\Unity Projects\Temp\Assets\test.boo' could not be opened. Exception has been thrown by the target of an invocation.
Details
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Boo.Lang.Compiler.CompilerParameters' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Boo.Lang.Compiler.TypeSystem.Types' threw an exception. ---> System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
at Boo.Lang.Compiler.TypeSystem.Types..cctor()
--- End of inner exception stack trace ---
at Boo.Lang.Compiler.TypeSystem.Reflection.ReflectionTypeSystemProvider.ObjectTypeImpl..ctor(IReflectionTypeSystemProvider provider)
at Boo.Lang.Compiler.TypeSystem.Reflection.ReflectionTypeSystemProvider..ctor()
at Boo.Lang.Compiler.CompilerParameters..cctor()
--- End of inner exception stack trace ---
at Boo.Lang.Compiler.CompilerParameters..ctor()
at Boo.Lang.Compiler.BooCompiler..ctor()
at Boo.MonoDevelop.ProjectModel.BooParser..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at Mono.Addins.TypeExtensionNode.CreateInstance() in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\external\mono-addins\Mono.Addins\Mono.Addins\TypeExtensionNode.cs:line 93
at MonoDevelop.Ide.TypeSystem.TypeSystemParserNode.get_Parser() in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.TypeSystem\TypeSystemParserNode.cs:line 63
at MonoDevelop.Ide.TypeSystem.TypeSystemService.GetParser(String mimeType, String buildAction) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.TypeSystem\TypeSystemService.cs:line 282
at MonoDevelop.SourceEditor.SourceEditorView.RunFirstTimeFoldUpdate(String text) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\addins\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor\SourceEditorView.cs:line 742
at MonoDevelop.SourceEditor.SourceEditorView.Load(String fileName, Encoding loadEncoding) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\addins\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor\SourceEditorView.cs:line 819
at MonoDevelop.SourceEditor.SourceEditorView.Load(String fileName) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\addins\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor\SourceEditorView.cs:line 729
at MonoDevelop.Ide.Gui.LoadFileWrapper.Invoke(String fileName) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\Workbench.cs:line 1201
Likewise when I do the same with a javascript file I get the following error:
An error has occurred
The file 'D:\Users\Public\Documents\Unity Projects\Temp\Assets\test.js' could not be opened. The type initializer for 'Boo.Lang.Compiler.TypeSystem.Types' threw an exception.
Details
System.TypeInitializationException: The type initializer for 'Boo.Lang.Compiler.TypeSystem.Types' threw an exception. ---> System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
at Boo.Lang.Compiler.TypeSystem.Types..cctor()
--- End of inner exception stack trace ---
at Boo.Lang.Compiler.TypeSystem.Reflection.ReflectionTypeSystemProvider.ObjectTypeImpl..ctor(IReflectionTypeSystemProvider provider)
at Boo.Lang.Compiler.TypeSystem.Reflection.ReflectionTypeSystemProvider..ctor()
at UnityScript.UnityScriptCompilerParameters..ctor(Boolean loadDefaultReferences)
at UnityScript.UnityScriptCompilerParameters..ctor()
at UnityScript.UnityScriptCompiler..ctor()
at UnityScript.MonoDevelop.ProjectModel.UnityScriptParserModule.ParseUnityScript(String fileName, String content)
at UnityScript.MonoDevelop.ProjectModel.UnityScriptParser.Parse(Boolean storeAst, String fileName, TextReader reader, Project project)
at MonoDevelop.SourceEditor.SourceEditorView.RunFirstTimeFoldUpdate(String text) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\addins\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor\SourceEditorView.cs:line 734
at MonoDevelop.SourceEditor.SourceEditorView.Load(String fileName, Encoding loadEncoding) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\addins\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor\SourceEditorView.cs:line 819
at MonoDevelop.SourceEditor.SourceEditorView.Load(String fileName) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\addins\MonoDevelop.SourceEditor2\MonoDevelop.SourceEditor\SourceEditorView.cs:line 729
at MonoDevelop.Ide.Gui.LoadFileWrapper.Invoke(String fileName) in c:\BuildAgent\work\d478831d940d36a4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\Workbench.cs:line 1201
But I can do the same with a C# script and it works just fine! What gives? Is there something wrong with the default installation? Is there anything I can do to fix this?
Answer by AndreBR · Feb 03, 2015 at 04:15 AM
I managed to solve this by installing .net framework version 4.5.
Here is the download link: http://www.microsoft.com/en-us/download/details.aspx?id=30653
Answer by Elandir · Nov 04, 2014 at 03:08 PM
The same is happening to me since I updated to 4.5.5f1. Looks like a bug:
Hopefully it will be fixed on next release.
Answer by HERMANHEUNES · Dec 17, 2014 at 11:24 AM
Go to program files unity monodevelop addins backendbindings in that folder their are two folders named boo and unityscript Remove them to a folder on your desktop out of the way if you now open a .js script you will get a warning message just click Okay if you leave monodevelop open you will not get the warning and you can open .js scripts.
Your answer
Follow this Question
Related Questions
Porting Code from javascript to boo. 1 Answer
What's wrong with eval()? 1 Answer
Static array with custom class? 1 Answer
JumpSpriteManager error 1 Answer