Bug 21229 - MainWindow partial class disappears after syncing the changes from XCode
Summary: MainWindow partial class disappears after syncing the changes from XCode
Status: RESOLVED FEATURE
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Other ()
Version: 1.8.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: 2.0.x
Assignee: Vincent Dondain [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2014-07-10 08:18 UTC by Prashant Cholachagudda
Modified: 2015-01-06 15:45 UTC (History)
4 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 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 FEATURE

Description Prashant Cholachagudda 2014-07-10 08:18:44 UTC
Steps to reproduce
-------------------

Create a Xamarin.Mac project called 'Alerts', and then

1.	I did a global search/replace to make the namespace in all appropriate files as “Learn.Lynda.Alerts”.
2.	I changed project options (General > Main Settings > Default Namespace) to “Learn.Lynda.Alerts”.
3.	I opened “MainWindow.xib” into Xcode:
a.	I added two buttons.
b.	Using the alternate editor, I Ctrl + Dragged from each button into the MainWindowController.h creating IBAction’s, one for each button.
c.	I saved changes and closed Xcode.

Once you switch to Xamarin Studio the `MainWindow` partial class disappears from MainWindow.designer.cs file, this results in generic Window instance.

Application output
--------------------
2014-07-08 19:06:59.009 Alerts[12900:2707] Unknown Window class MainWindow in Interface Builder file,
creating generic Window instead
Comment 1 Sadik Ali 2014-08-26 08:35:58 UTC
I have tried to reproduce this issue with the steps mentioned on bug description and here is my observations.

I have added two buttons to MainWindow.xib file using the Xcode and added action to the "MainWindowController.h" file using Ctrl+dragged. After adding action to the "MainWindowController.h" file I have save all the file and closed the Xcode and open the "MainWindow.designer.cs" file in XS and observed that it still contains the "MainWindow" partial class.

However, when I try to build the solution , I am getting same error that is mentioned in bug description. 

Screencast: http://screencast.com/t/vIZxxhIpb

Application Output: https://gist.github.com/anonymous/fdd5cf7421851de1e39f
IDE logs:https://gist.github.com/anonymous/f5f99c50b0922a046d1c

Please let me know if I am missing anything?

Environment Info:
=== Xamarin Studio ===

Version 5.2.1 (build 1)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 3.8.0 ((no/62a857e)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000007

=== Xamarin.Android ===

Version: 4.14.0 (Enterprise Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 7.2.6.28 (Enterprise Edition)
Hash: 606f31a
Branch: 
Build date: 2014-08-01 15:27:48-0400

=== Xamarin.Mac ===

Version: 1.10.0.4 (Enterprise Edition)

=== Build Information ===

Release ID: 502010001
Git revision: d06832ce9807d6be24aca225457e8b37c7669f6f
Build date: 2014-08-07 12:10:47-04
Xamarin addins: 1de032531be4cecf2f39dbee3b87aac78204058c

=== Operating System ===

Mac OS X 10.9.2
Darwin MacMini.local 13.1.0 Darwin Kernel Version 13.1.0
    Thu Jan 16 19:40:37 PST 2014
    root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
Comment 2 Vincent Dondain [MSFT] 2015-01-06 15:45:35 UTC
Hey guys, I couldn't reproduce this issue using Xamarin Studio 5.7 (660) and Xamarin.Mac 1.11.3.0 (current Alpha). I think this bug has been fix already so I'm resolving it as fixed, however feel free to reopen it if you still have it.