Bug 1248 - Publish project in git fails
Summary: Publish project in git fails
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Version Control ()
Version: 2.6 RC 1
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Lluis Sanchez
Depends on:
Reported: 2011-10-05 06:17 UTC by David Black
Modified: 2012-03-01 06:04 UTC (History)
3 users (show)

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:

Description David Black 2011-10-05 06:17:32 UTC
Hello Xamarin

I have created a private github project
I go to version control -> publish to add my project to github
I add the server details and press Publish
MD prompts if I want to confirm the publication
I click OK
MD Pauses then I get an exception 

Version Control operation failed: Operation is not valid due to the current state of the object.

System.InvalidOperationException: Operation is not valid due to the current state of the object
  at System.Linq.Enumerable.Single[VersionInfo] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00038] in /private/tmp/monobuild/build/BUILD/mono-2.10.5/mcs/class/System.Core/System.Linq/Enumerable.cs:2330 
  at System.Linq.Enumerable.Single[VersionInfo] (IEnumerable`1 source) [0x00006] in /private/tmp/monobuild/build/BUILD/mono-2.10.5/mcs/class/System.Core/System.Linq/Enumerable.cs:2346 
  at MonoDevelop.VersionControl.Repository.GetVersionInfo (FilePath localPath, Boolean getRemoteStatus) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Repository.cs:154 
  at MonoDevelop.VersionControl.ChangeSet.AddFile (FilePath file) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/ChangeSet.cs:98 
  at MonoDevelop.VersionControl.Git.GitRepository.Publish (System.String serverPath, FilePath localPath, MonoDevelop.Core.FilePath[] files, System.String message, IProgressMonitor monitor) [0x00063] in /private/tmp/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitRepository.cs:339 
  at MonoDevelop.VersionControl.PublishWorker.Run () [0x00000] in /private/tmp/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/PublishCommand.cs:93 
  at MonoDevelop.VersionControl.Task.BackgroundWorker (System.Object state) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Task.cs:49
Comment 1 David Black 2011-10-08 06:33:37 UTC
I have just upgraded to 2.8 in the hope that this might work but the same issue happens still
Comment 2 Alan McGovern 2012-03-01 06:04:21 UTC
This issue should be resolved with MonoDevelop 2.8.8 or higher. I have fixed several causes of this issue and have published many projects during my testing without seeing this exception. Please reopen this bug if it appears in MD 2.8.8 or higher.