Bug 1471 - Adding existing project to solution should prompt format upgrade
Summary: Adding existing project to solution should prompt format upgrade
Status: NEW
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: Trunk
Hardware: PC Windows
: Low major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-10-13 06:03 UTC by Mikayla Hutchinson [MSFT]
Modified: 2015-09-25 13:17 UTC (History)
2 users (show)

Tags:
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 for Bug 1471 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Mikayla Hutchinson [MSFT] 2011-10-13 06:03:53 UTC
Adding an existing project to a solution should prompt format upgrade if the formats don't match. Current it doesn't, and explodes on save.

Repro steps:
1) Create new empty VS2008 solution
2) Add an existing VS2010 project to it
3) It doesn't prompt to upgrade the solution format
4) Open solution options, click OK
5) MD prompts to convert the format
6) On converting, it throws the following exceptions:

Error - 10:59:11 AM - Could not save solution: C:\Users\Michael\work\AndroidTools\AndroidTools.sln
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at MonoDevelop.Projects.Formats.MSBuild.SlnFileFormat.WriteProjects(SolutionFolder folder, String baseDirectory, StreamWriter writer, Boolean saveProjects, IProgressMonitor monitor) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects.Formats.MSBuild\SlnFileFormat.cs:line 213
   at MonoDevelop.Projects.Formats.MSBuild.SlnFileFormat.WriteFileInternal(String file, Solution solution, String baseDir, MSBuildFileFormat format, Boolean saveProjects, IProgressMonitor monitor) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects.Formats.MSBuild\SlnFileFormat.cs:line 131
   at MonoDevelop.Projects.Formats.MSBuild.SlnFileFormat.WriteFile(String file, Object obj, MSBuildFileFormat format, Boolean saveProjects, IProgressMonitor monitor) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects.Formats.MSBuild\SlnFileFormat.cs:line 91
Error - 10:59:11 AM - System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at MonoDevelop.Projects.Formats.MSBuild.SlnFileFormat.WriteProjects(SolutionFolder folder, String baseDirectory, StreamWriter writer, Boolean saveProjects, IProgressMonitor monitor) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects.Formats.MSBuild\SlnFileFormat.cs:line 213
   at MonoDevelop.Projects.Formats.MSBuild.SlnFileFormat.WriteFileInternal(String file, Solution solution, String baseDir, MSBuildFileFormat format, Boolean saveProjects, IProgressMonitor monitor) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects.Formats.MSBuild\SlnFileFormat.cs:line 131
   at MonoDevelop.Projects.Formats.MSBuild.SlnFileFormat.WriteFile(String file, Object obj, MSBuildFileFormat format, Boolean saveProjects, IProgressMonitor monitor) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects.Formats.MSBuild\SlnFileFormat.cs:line 101
   at MonoDevelop.Projects.Formats.MSBuild.MSBuildFileFormat.WriteFile(FilePath file, Object obj, IProgressMonitor monitor) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects.Formats.MSBuild\MSBuildFileFormat.cs:line 147
   at MonoDevelop.Projects.ProjectService.WriteFile(IProgressMonitor monitor, String file, Object item, FileFormat format) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectService.cs:line 335
   at MonoDevelop.Projects.ProjectService.InternalWriteWorkspaceItem(IProgressMonitor monitor, String file, WorkspaceItem item) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectService.cs:line 295
   at MonoDevelop.Projects.WorkspaceItem.OnSave(IProgressMonitor monitor) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects\WorkspaceItem.cs:line 228
   at MonoDevelop.Projects.DefaultProjectServiceExtension.Save(IProgressMonitor monitor, WorkspaceItem entry) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectService.cs:line 652
   at MonoDevelop.Projects.ProjectServiceExtension.Save(IProgressMonitor monitor, WorkspaceItem item) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectServiceExtension.cs:line 71
   at MonoDevelop.Projects.ProjectServiceExtension.Save(IProgressMonitor monitor, WorkspaceItem item) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectServiceExtension.cs:line 71
   at MonoDevelop.Projects.ProjectServiceExtension.Save(IProgressMonitor monitor, WorkspaceItem item) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectServiceExtension.cs:line 71
   at MonoDevelop.Projects.ProjectServiceExtension.Save(IProgressMonitor monitor, WorkspaceItem item) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectServiceExtension.cs:line 71
   at MonoDevelop.Projects.ProjectServiceExtension.Save(IProgressMonitor monitor, WorkspaceItem item) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectServiceExtension.cs:line 71
   at MonoDevelop.Projects.ProjectServiceExtension.Save(IProgressMonitor monitor, WorkspaceItem item) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects\ProjectServiceExtension.cs:line 71
   at MonoDevelop.Projects.WorkspaceItem.Save(IProgressMonitor monitor) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Core\MonoDevelop.Projects\WorkspaceItem.cs:line 357
   at MonoDevelop.Ide.ProjectOperations.Save(Solution item) in c:\Users\Michael\work\monodevelop\main\src\core\MonoDevelop.Ide\MonoDevelop.Ide\ProjectOperations.cs:line 372