使用带有MonoDevelop / Windows 7的git的项目

时间:2012-01-13 19:46:42

标签: git mono monodevelop

我在Visual Web Developer Express 2010上创建了一个项目,并将其添加到github。

https://github.com/vmrocha/jQueryLab

当我尝试在MonoDevelop上构建它或打开“版本控制”菜单时,我收到以下错误:

   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)

2 个答案:

答案 0 :(得分:2)

如果您的MonoDevelop项目位于Git存储库中,则会发生这种情况。 Windows + Git + MonoDevelop是一种致命的组合。要解决这个问题,请进入MonoDevelop - >工具 - >加载项管理器 - >版本控制 - 然后禁用Git支持。

答案 1 :(得分:0)

对于MonoDevelop的'NGit.Util.FS',您的源路径Illegal characters in path似乎有问题

尝试将源移动到另一个文件夹(出于测试原因,让它为C:\ Temp)并尝试再次打开项目