Bug 260 - XCode 4 migration is broken for TweetStation
Summary: XCode 4 migration is broken for TweetStation
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: Trunk
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2011-08-11 05:37 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2011-08-12 08:50 UTC (History)
2 users (show)

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


Attachments
Log (8.82 KB, text/plain)
2011-08-11 05:37 UTC, Rolf Bjarne Kvinge [MSFT]
Details


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 Rolf Bjarne Kvinge [MSFT] 2011-08-11 05:37:46 UTC
Created attachment 108 [details]
Log

Open TweetStation in MD trunk.
Click Migrate button.

I get this message:

Error while trying to load the project /mono/ios/TweetStation/TweetStation/TweetStation.csproj
System.ArgumentException: The node to be removed is not a child of this node.

See attached stack trace.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2011-08-11 12:00:36 UTC
This fix works for me:

commit 6b25fc291af0e790c72a9b3849b2075c01124b2d
Author: Rolf Bjarne Kvinge <rolf@xamarin.com>
Date:   Thu Aug 11 18:00:11 2011 +0200

    [iPhone] Fix exception during migration (bug 260).

diff --git a/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneProjectMigrationHandler.cs b/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneProjectMigrationHandler.cs
index 5083bf7..ceaadc7 100644
--- a/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneProjectMigrationHandler.cs
+++ b/MonoDevelop.IPhone/MonoDevelop.IPhone/Project/IPhoneProjectMigrationHandler.cs
@@ -79,7 +79,7 @@ namespace MonoDevelop.IPhone
                                        continue;
                                var newElement = project.doc.CreateElement (BuildAction.InterfaceDefinition);
                                newElement.InnerXml = item.Element.InnerXml;
-                               project.doc.ReplaceChild (newElement, item.Element);
+                               item.Element.ParentNode.ReplaceChild (newElement, item.Element);
                                // Required ?
 //                             item.Element = newElement; 
                        }
Comment 2 Mike Krüger 2011-08-12 08:50:37 UTC
y it's the correct fix - thanks