Bug 2892 - Build failed. The type initializer for 'NGit.Util.FS' threw an exception.
Summary: Build failed. The type initializer for 'NGit.Util.FS' threw an exception.
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: 2.8.5
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Alan McGovern
URL:
Depends on:
Blocks:
 
Reported: 2012-01-13 14:04 UTC by Vinicius de Melo Rocha
Modified: 2012-03-01 06:01 UTC (History)
2 users (show)

Tags: git
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Vinicius de Melo Rocha 2012-01-13 14:04:35 UTC
I have a project created on Visual Web Express 2010 and I get this error when I try to compile the project using MonoDevelop:

Build failed. The type initializer for 'NGit.Util.FS' threw an exception.

The project is hosted on GitHub:
https://github.com/vmrocha/jQueryLab
Comment 1 Vinicius de Melo Rocha 2012-01-13 14:18:15 UTC
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)

   at System.IO.Path.Combine(String path1, String path2)

   at Sharpen.FilePath..ctor(String other, String child)

   at NGit.Util.FS.SearchPath(String path, String[] lookFor)

   at NGit.Util.FS_Win32_Cygwin.IsCygwin()

   at NGit.Util.FS.Detect(Nullable`1 cygwinUsed)

   at NGit.Util.FS.Detect()

   at NGit.Util.FS..cctor()

   --- End of inner exception stack trace ---

   at NGit.BaseRepositoryBuilder`2.SetupWorkTree()

   at NGit.BaseRepositoryBuilder`2.Setup()

   at NGit.Storage.File.FileRepository..ctor(FilePath gitDir)

   at NGit.Storage.File.FileRepository..ctor(String gitDir)

   at MonoDevelop.VersionControl.Git.LocalGitRepository..ctor(String path)

   at MonoDevelop.VersionControl.Git.GitRepository..ctor(FilePath path, String url)

   at MonoDevelop.VersionControl.Git.GitVersionControl.GetRepositoryReference(FilePath path, String id)

   at MonoDevelop.VersionControl.VersionControlService.GetRepositoryReference(String path, String id)

   at MonoDevelop.VersionControl.VersionControlService.GetRepository(IWorkspaceObject entry)

   at MonoDevelop.VersionControl.SolutionVersionControlCommandHalder.GetItems()

   at MonoDevelop.VersionControl.SolutionVersionControlCommandHalder.Update(CommandInfo info)

   at MonoDevelop.Components.Commands.CommandHandler.InternalUpdate(CommandInfo info)

   at MonoDevelop.Components.Commands.CommandManager.DefaultUpdateCommandInfo(ActionCommand cmd, CommandInfo info)

   at MonoDevelop.Components.Commands.CommandManager.GetCommandInfo(Object commandId, CommandTargetRoute targetRoute)
Comment 2 Alan McGovern 2012-02-14 06:18:04 UTC
Would you be able to tell me the value of the 'PATH' environment variable on your system? If you're running monodevelop from a command prompt you can just use 'echo' to print it out, alternatively you could follow the instructions here to find it:

http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx

We should be able to figure out the cause of the bug with that information.
Comment 3 Alan McGovern 2012-03-01 06:01:37 UTC
While I still need the value of the 'PATH' variable in order to diagnose and resolve this bug properly, this should be fixed with MonoDevelop 2.8.8 or higher so I am closing the bug as no further information has been provided.