Bug 3067 - designer.cs file is written over each time new UI elements are control-dragged in Interface Builder
Summary: designer.cs file is written over each time new UI elements are control-dragge...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 2.8.6
Assignee: Jeffrey Stedfast
: 3147 ()
Depends on:
Reported: 2012-01-25 14:28 UTC by whitney.z
Modified: 2012-01-30 16:38 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 whitney.z 2012-01-25 14:28:25 UTC
When control-dragging elements from Interface Builder to link them as Outlets or Actions to your ViewController.h file, the changes to that file are reflected in the designer.cs file, but then when switching to Monodevelop to observe the changes and then switching back to XCode, the ViewController.h file only contains the default auto-generated code and does not reflect the changes in the designer.cs file. If the ViewController.h file is saved, the designer.cs file will then reflect the default code in the ViewController.h file. If another UI element is control-dragged from IB into that now blank ViewController.h file in XCode, without having saved the blank ViewController.h file, the designer.cs file will now be written over with the newly added UI element code. Instead of just adding that new UI element code to the designer.cs file.
Comment 1 whitney.z 2012-01-25 14:34:13 UTC
Steps to reproduce:

1. Drag a UI element in interface builder to the ViewController.h file in XCode.
2. Switch into MonoDevelop.
3. Switch back to XCode (You'll see that the changes to the ViewController.h file are no longer there.)
4. Save the blank file and the designer.cs file will change back to it's default code or drag another UI element into VC.h file and the code in designer.cs will be written over.
Comment 2 Jeffrey Stedfast 2012-01-26 11:10:28 UTC
I've seen this too. Tracking it down now
Comment 3 Jeffrey Stedfast 2012-01-26 12:36:34 UTC
Fixed in git master
Comment 4 Jeffrey Stedfast 2012-01-30 16:38:02 UTC
*** Bug 3147 has been marked as a duplicate of this bug. ***