Bug 14359 - Xamarin Studio cannot compile until I close the app and restart
Summary: Xamarin Studio cannot compile until I close the app and restart
Status: NEW
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Project Model ()
Version: unspecified
Hardware: Macintosh Mac OS
: Low normal
Target Milestone: master
Assignee: Lluis Sanchez
Depends on:
Reported: 2013-08-31 07:15 UTC by Joseph Broms
Modified: 2013-09-02 04:23 UTC (History)
2 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 for Bug 14359 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:

Description Joseph Broms 2013-08-31 07:15:49 UTC
Description of Problem:
In Xamarin Studio, there is some issue with the statefullness of the compiler/xamarin studio with compiling code.  I was working on a project where I changed the arguments of a delegate from void MyDelegate(MyEnum enum) to void MyDelegate().  I used the delegate in an event interface below this in the same file.

In another file that was impelementing this interface, the compiler would compain that the event requires a parameter to be invoked---I am assuming this is the enum that I had but then removed.  Clean or rebuild does not fix this.  Only shutting down Xamarin Studio will fix this.

Steps to reproduce the problem:

In one file define:
	public delegate void StateChanged(ProcessState state);

	public enum ProcessState

	public interface IBackgroundProcess
		event StateChanged OnStateChanged;

then in another file define

	class MyClass : IBackgroundProcess
		public event StateChanged OnStateChanged;

                void Foo() {
                   if (OnStateChanged!=null) OnStateChanged(ProcessState.Running);

then change first file with
	public delegate void StateChanged(ProcessState state);
and second file with 
        if (OnStateChanged!=null) OnStateChanged(ProcessState.Running);

Compilier error until you close Xamarin Studio and restart.

Actual Results:
Should just work with at least a Rebuild All

Expected Results:

How often does this happen? 
Just once 

Additional Information:
Running Xamarin Studio 4.0.12 (3) on Mac Air 2012 (OS X 10.8.4)