I installed Unity 4.1.5f1 yesterday which came with MonoDevelop 2.8.2 (on Windows 7). In my Unity project I created a new C# script and double clicked on it to open it. MonoDevelop opened and then immediately crashed with the following error:
System.TypeInitializationException: The type initializer for 'NGit.Util.FS' threw an exception. ---> System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.Combine(String path1, String path2)
at Sharpen.FilePath..ctor(String other, String child) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\Sharpen\Sharpen\FilePath.cs:line 30
at NGit.Util.FS.SearchPath(String path, String[] lookFor) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\NGit\NGit.Util\FS.cs:line 279
at NGit.Util.FS_Win32_Cygwin.IsCygwin() in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\NGit\NGit.Util\FS_Win32_Cygwin.cs:line 62
at NGit.Util.FS.Detect(Nullable`1 cygwinUsed) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\NGit\NGit.Util\FS.cs:line 99
at NGit.Util.FS.Detect() in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\NGit\NGit.Util\FS.cs:line 67
at NGit.Util.FS..cctor() in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\NGit\NGit.Util\FS.cs:line 60
--- End of inner exception stack trace ---
at NGit.BaseRepositoryBuilder`2.SetupWorkTree() in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\NGit\NGit\BaseRepositoryBuilder.cs:line 753
at NGit.BaseRepositoryBuilder`2.Setup() in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\NGit\NGit\BaseRepositoryBuilder.cs:line 679
at NGit.Storage.File.FileRepository..ctor(FilePath gitDir) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\NGit\NGit.Storage.File\FileRepository.cs:line 111
at NGit.Storage.File.FileRepository..ctor(String gitDir) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\contrib\NGit\NGit.Storage.File\FileRepository.cs:line 127
at MonoDevelop.VersionControl.Git.LocalGitRepository..ctor(String path) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\addins\VersionControl\MonoDevelop.VersionControl.Git\MonoDevelop.VersionControl.Git\GitRepository.cs:line 1478
at MonoDevelop.VersionControl.Git.GitRepository..ctor(FilePath path, String url) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\addins\VersionControl\MonoDevelop.VersionControl.Git\MonoDevelop.VersionControl.Git\GitRepository.cs:line 71
at MonoDevelop.VersionControl.Git.GitVersionControl.GetRepositoryReference(FilePath path, String id) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\addins\VersionControl\MonoDevelop.VersionControl.Git\MonoDevelop.VersionControl.Git\GitVersionControl.cs:line 61
at MonoDevelop.VersionControl.Git.GitVersionControl.GetRepositoryReference(FilePath path, String id) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\addins\VersionControl\MonoDevelop.VersionControl.Git\MonoDevelop.VersionControl.Git\GitVersionControl.cs:line 65
at MonoDevelop.VersionControl.VersionControlService.GetRepositoryReference(String path, String id) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\addins\VersionControl\MonoDevelop.VersionControl\MonoDevelop.VersionControl\VersionControlService.cs:line 199
at MonoDevelop.VersionControl.VersionControlService.GetRepository(IWorkspaceObject entry) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\addins\VersionControl\MonoDevelop.VersionControl\MonoDevelop.VersionControl\VersionControlService.cs:line 185
at MonoDevelop.VersionControl.Views.SubviewAttachmentHandler.AttachViewContents(Document document) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\addins\VersionControl\MonoDevelop.VersionControl\MonoDevelop.VersionControl.Views\SubviewAttachmentHandler.cs:line 47
at MonoDevelop.VersionControl.Views.SubviewAttachmentHandler.HandleDocumentOpened(Object sender, DocumentEventArgs e) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\addins\VersionControl\MonoDevelop.VersionControl\MonoDevelop.VersionControl.Views\SubviewAttachmentHandler.cs:line 71
at MonoDevelop.Ide.Gui.Workbench.OnDocumentOpened(DocumentEventArgs e) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\Workbench.cs:line 988
at MonoDevelop.Ide.Gui.Workbench.WrapDocument(IWorkbenchWindow window) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\Workbench.cs:line 577
at MonoDevelop.Ide.Gui.ViewCommandHandlers..ctor(IWorkbenchWindow window) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\ViewCommandHandlers.cs:line 49
at MonoDevelop.Ide.Gui.SdiWorkspaceWindow..ctor(DefaultWorkbench workbench, IViewContent content, Notebook tabControl, TabLabel tabLabel) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\SdiWorkspaceWindow.cs:line 98
at MonoDevelop.Ide.Gui.DefaultWorkbench.ShowView(IViewContent content, Boolean bringToFront) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\DefaultWorkbench.cs:line 381
at MonoDevelop.Ide.Gui.LoadFileWrapper.Invoke(String fileName) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\Workbench.cs:line 1093
at MonoDevelop.Ide.Gui.Workbench.RealOpenFile(FileOpenInformation openFileInfo) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\Workbench.cs:line 772
at MonoDevelop.Ide.Gui.Workbench.OpenDocument(FilePath fileName, Int32 line, Int32 column, OpenDocumentOptions options, String encoding, IViewDisplayBinding binding) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\Workbench.cs:line 390
at MonoDevelop.Ide.Gui.Workbench.OpenDocument(FilePath fileName, Int32 line, Int32 column, OpenDocumentOptions options) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide.Gui\Workbench.cs:line 331
at MonoDevelop.Ide.IdeApp.<>c__DisplayClass10.<OpenFiles>b__d(Object , WorkspaceItemEventArgs ) in c:\BuildAgent\work\f07246b5212f7be4\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide\Ide.cs:line 334
I get this error every time I try to open a script, so I’m basically stuck. I’ve searched for an answer to this, but the only suggestions I could find were from last year from people using Unity 3.5, and the consensus was to reinstall Unity/Mono. This is a fresh install of both on two separate computers, and the same thing is happening on both machines.