Hey, I just installed Unity onto another computer and it will not allow me to open a JS file in monodevelop. The only files that will open and allow editing are C#, but I do not know that language just yet, so I would like to still be able to use JS… Any ideas??
If you double-click a JS file in the Unity editor, what application is opened to edit/view it? Sometimes machines have file extensions configured to open applications by default, which can interfere with MonoDevelop opening them. If you can, configure your new machine to use MonoDevelop to open JS files.
I am sorry to do this, but these are the details from the error message I get.
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
I put it in code format so that it may be smaller. It tries to open in Monodevelop though.
I get the exact same error in Unity 4.5.5f1, 4.5.4f2 and 4.5.4f3 loading Js or boo scripts, or creating a new one. If I revert back to unity 4.5.4f1, monodevelope has no issues loading js and boo scripts. No issues loading C# scripts in all versions.
System OS is windows 7 64 bit.