Bug 41572 - InitializeComponent() The Call is Ambiguous between 'ClassName.InitializeComponent()' and 'ClassName.InitializeComponent()'
Summary: InitializeComponent() The Call is Ambiguous between 'ClassName.InitializeComp...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Xamarin.Forms Add-in ()
Version: 6.0.0 (C7)
Hardware: Macintosh Mac OS
: High normal
Target Milestone: (C8)
Assignee: David Karlaš
: 41625 41928 42090 ()
Depends on:
Reported: 2016-06-07 19:24 UTC by Rafael Veronezi
Modified: 2017-03-21 20:55 UTC (History)
19 users (show)

Tags: BZRC7S1_C6SR3S1, DefectEscapeReview_Done
Is this bug a regression?: Yes
Last known good build: Cycle 6 – Service Release 3

The presented error (131.86 KB, image/png)
2016-06-07 19:24 UTC, Rafael Veronezi
Test case (4.97 KB, application/zip)
2016-06-20 23:59 UTC, Brendan Zagaeski (Xamarin Team, assistant)
screen cap of XS Mac (133.96 KB, image/png)
2016-07-21 00:42 UTC, Paul Mace
Still here. (305.35 KB, image/png)
2016-08-01 04:33 UTC, Chad
bug is not fixed in XS 6.1.1 (111.97 KB, image/jpeg)
2016-10-27 18:23 UTC, roll

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 Rafael Veronezi 2016-06-07 19:24:37 UTC
Created attachment 16218 [details]
The presented error

Hello fellows,
Since I've updated to Xamarin Studio 6.0 (RC2 and above) I've found this issue with my previous projects, all the XAML Componentes are presenting this error when opening it's code-behind file (.cs) file. It says that the call to InitializeComponent() is ambiguous between the same class. The same error is presented for any property declared in the XAML file. This doesn't happen with brand new files.

Today I've updated Xamarin Studio 6.0 to RC4 that was just released, then the problem started to appear even in the project that I'd created with Xamarin Studio 6.0 RC2 and RC3.

I've tried the following:
- Clean and Rebuild the Project
- Clean and manually delete bin and obj folders from every project and PCL

Nothing worked.

Things I've noticed:
- The error disappears if I delete the x:Class reference from the XAML
- Ambiguity errors in properties of XAML doesn't prevent Autocomplete for Working
- Ambiguity errors in properties only happens for properties prior to upgrading Xamarin Studio, newly created properties works fine
- Those erros doesn't appear in Error toolwindow at all

This looks like some kind of caching issue that may be duplicating the generated file, and strangely only affects Xamarin Studio because the program compiles and works fine.

Hope you can help me with some workaround and fix this by next release.
Best regards,
Comment 1 Lluis Sanchez 2016-06-09 09:00:41 UTC
*** Bug 41625 has been marked as a duplicate of this bug. ***
Comment 2 xamarin-release-manager 2016-06-09 21:43:19 UTC
Fixed in version (cycle7)

Author: Lluis Sanchez
Commit: f1112d74ad5b2fce651c7442d97be8d7f8a18216 (mono/monodevelop)
Comment 3 Rafael Veronezi 2016-06-09 23:29:53 UTC
Is the release available?
Comment 4 Lluis Sanchez 2016-06-10 08:09:26 UTC
Not yet. If that's a blocker for you I can send you a custom build with the fix.
Comment 5 Rafael Veronezi 2016-06-11 16:06:40 UTC
Will this be addressed on the current stable cycle or in the next Cycle?
Comment 6 xamarin-release-manager 2016-06-12 17:52:18 UTC
Fixed in version (cycle7)

Author: Lluis Sanchez
Commit: bdf8835e06e6f679e440b1819d91ac46ace7cba5 (xamarin/md-addins)
Included in Commit: 4a2dd27efd62bb9db405e3beb15f4a754f2101ff (mono/monodevelop)
Comment 7 Lluis Sanchez 2016-06-13 09:03:49 UTC
It will be addressed in the current cycle.
Comment 8 Mohit Kheterpal 2016-06-15 16:51:23 UTC
I have checked this issue with fixed build provided in trello card and observed that this issue is working fine now as shown in screencast : http://www.screencast.com/t/QygKR1CM

Hence closing this issue by marking this as Verified.

Comment 9 xamarin-release-manager 2016-06-15 18:46:07 UTC
Fixed in version (cycle7-app-insights-rebased)

Author: Lluis Sanchez
Commit: f1112d74ad5b2fce651c7442d97be8d7f8a18216 (mono/monodevelop)
Comment 10 xamarin-release-manager 2016-06-15 21:10:55 UTC
Fixed in version (cycle7-sr0)

Author: David Karlas??
Commit: c5f164ba8be1331c45e16143123ad1eb2a636619 (mono/monodevelop)
Comment 11 xamarin-release-manager 2016-06-15 21:14:37 UTC
Fixed in version (cycle7-sr0)

Author: David Karlas??
Commit: 6b2d756b70ac7ff0fa9c26500b95a4444e23d74c (xamarin/md-addins)
Included in Commit: bb80c8bacb3418b787ea314d4b39eee000b70c59 (mono/monodevelop)
Comment 12 Brendan Zagaeski (Xamarin Team, assistant) 2016-06-20 23:59:39 UTC
Created attachment 16414 [details]
Test case

## Verification status: perhaps some detail still missing in the candidate fix?

BAD: Xamarin Studio (build 6) (3ea718ee98e217cc1d3f870443425bcafe8afc03)

I double-checked briefly, and it looks this revision of Xamarin Studio should in theory include the proposed changes from both monodevelop and md-addins.

So to be on the safe side, I'm going to reopen this bug for additional verification.

## Steps followed to attempt to verify

1. Open the attached test case in Xamarin Studio.

2. Wait for the package restore to complete.

3. Close the solution.

4. Reopen the solution.

5. Open the `FormsPortable1Page.xaml.cs` code-behind file in the Source Code Editor.

## Results

Xamarin Studio's analysis of the file shows an Error in the Source Code Editor:

> The call is ambiguous between the following methods or properties:
> 'FormsPortable1Page.InitialiazeComponent()' and
> 'FormsPortable1Page.InitialiazeComponent()'

(But the project does _build_ without error.) 

## Additional test environment version info (brief)

Xamarin Studio 6.0.1 (build 6) (3ea718ee98e217cc1d3f870443425bcafe8afc03)

Mono 4.4.0 (mono-4.4.0-branch-c7sr0/a19399e) (64-bit)

Xamarin addins: a9252e6df4851fbbed1f9c6228e7b6dd1b475ac5
Build lane: monodevelop-lion-cycle7-sr0

Mac OS X 10.11.5
Comment 13 Mohit Kheterpal 2016-06-21 16:32:46 UTC
I have checked this issue and able to reproduce this issue. 

With forms shared project this issue is fixed. However with forms PCL project this issue is reproducible with specific scenario. 

If I create a forms PCL template project and open "abcPage.xaml.cs" then error does not appear at "InitializeComponent()".

Close the solution and reopen it then still error does not appear at "InitializeComponent()"

Then I update xamarin.forms package to version After updating xamarin.forms package version, just close and reopen the solution again to see the error on "InitializeComponent()"

Comment 14 xamarin-release-manager 2016-06-21 17:12:08 UTC
Fixed in version (master)

Author: David Karla??
Commit: 583db198063179044eee1cded6359554da5bafb0 (xamarin/md-addins)
Included in Commit: da4b1065154164cab7d51b47090e04b43894f36a (mono/monodevelop)
Comment 17 Rafael Veronezi 2016-06-21 18:41:09 UTC
Mohit, it's exactly that.

Luis Aguilera,
When will those SR's be released? This problem is extremely annoying on larger projects, and I'm able to reproduce this on every Forms project that I open.
Comment 18 Brendan Zagaeski (Xamarin Team, assistant) 2016-06-21 18:45:19 UTC
Cycle 7 – Service Release 0 is in Beta currently (with the fix for shared projects).

Cycle 7 – Service Release 1 is tentatively scheduled for Beta or Stable within roughly a 1 week timeframe from now.
Comment 19 Mohit Kheterpal 2016-06-22 16:02:24 UTC
I have checked this issue with latest master build of XS and observed that this issue has been fixed as shown in screecast : http://www.screencast.com/t/yBeMnbZLMvn

Using XamarinStudio-

Hence closing this issue by marking it as Verified.

Comment 20 Rafael Veronezi 2016-06-22 16:55:39 UTC
Alright. I saw SR0 was released yesterday, do you have a preview of when the SR1 will be available?

Comment 21 Brendan Zagaeski (Xamarin Team, assistant) 2016-06-22 16:56:13 UTC
*** Bug 41928 has been marked as a duplicate of this bug. ***
Comment 22 Brendan Zagaeski (Xamarin Team, assistant) 2016-06-22 17:03:27 UTC
As noted in Comment 19:

> Cycle 7 – Service Release 1 is tentatively scheduled for Beta or Stable within roughly a 1 week timeframe from now.
Comment 23 Brendan Zagaeski (Xamarin Team, assistant) 2016-06-22 19:21:59 UTC
Ah, and to help clarify further, the current target milestone of this bug "C7SR1" as well as the further abbreviated "SR1" mentioned in the (private / only visible to the reporting user) Comment 15 are both abbreviations for:

"Cycle 7 – Service Release 1".
Comment 24 Rafael Veronezi 2016-06-23 05:03:21 UTC
Thanks for clarification Brendan. I'm following up on this release.
Comment 25 Brendan Zagaeski (Xamarin Team, assistant) 2016-06-26 06:16:32 UTC
## Status clarification for any users watching this bug

In case Friday's Xamarin Studio update might cause any questions about this, the fix for this bug (Bug 41572) is _not_ yet included in Xamarin Studio ("Xamarin Studio Stable Hotfix For Incompatible XS Addins") [1].  That hotfix release contained just one very specific fix for an unrelated issue.

[1] https://releases.xamarin.com/xamarin-studio-stable-hotfix-for-incompatible-xs-addins/

The "Cycle 7 – Service Release 1" release is still tentatively on track for an initial Beta this upcoming week (the week of June 27), and that release _will_ include the fix for this bug (Bug 41572).
Comment 26 Cliff Cawley 2016-07-04 01:24:46 UTC
The week of June 27 has come and gone and it's frustrating working around this bug. There's no context sensitive help and false positive errors through your source files. Creating a local variable of the correct type so that I can find the property I'm after is painful.

When can we expect this hot fix?
Comment 27 Rafael Veronezi 2016-07-04 16:22:45 UTC
Yeah Cliff, I've found very unfortunate that this bug didn't make to the first Service Release and that we still don't have a fix either in Beta.

Still waiting for the fix.
Comment 28 xamarin-release-manager 2016-07-05 16:04:01 UTC
Fixed in version (cycle7)

Author: David Karla??
Commit: a318cd4381d5ae0486879cea9cabb50094ffe29d (xamarin/md-addins)
Included in Commit: fd4dabab63b2c5edf09d3d28159a19a55e3e97c8 (mono/monodevelop)
Comment 29 Brendan Zagaeski (Xamarin Team, assistant) 2016-07-05 19:21:27 UTC
> The week of June 27 has come and gone

There were unfortunately some Beta-release-blocking issues found in the candidate builds during testing last week.  The Xamarin team is working on resolving those issues as quickly as possible.  So it turned out that "tentatively" was indeed a key word in my previous update (in Comment 25).  There is some internal discussion on-going today about the best option to provide preview builds as soon as possible.  I will update this bug report with more specifics if there is more news before those preview builds are themselves available.

Note that the IDE is often fairly "loosely coupled" with the other products, so it might work OK for most usage scenarios to temporarily downgrade [1] just the Xamarin Studio IDE to the previous version 5.10 until the fix for this issue is available.

[1] https://kb.xamarin.com/customer/portal/articles/1699777-how-do-i-downgrade-to-an-older-version-of-xamarin-
Comment 30 Paul Mace 2016-07-06 20:59:32 UTC
So, Cycle 7 service release 1 XS is And doesn't fix this!  AAAARRRRRRRGH!
Comment 31 Brendan Zagaeski (Xamarin Team, assistant) 2016-07-06 21:07:20 UTC
@Paul,  _very_ unfortunately as hinted at by Comment 28, it appears that the fix was not "picked back" onto the Cycle 7 source code "branch" before this exact early Beta version was built.  The fix _will_ be included in the next Beta version of Cycle 7 – Service Release 1.  As usual, I will keep this bug up-to-date as I hear additional news about the timeline for availability of a build that includes the fix.
Comment 32 David Karlaš 2016-07-12 08:33:05 UTC
*** Bug 42090 has been marked as a duplicate of this bug. ***
Comment 33 Brendan Zagaeski (Xamarin Team, assistant) 2016-07-20 23:41:36 UTC
## Status update for any users watching this bug

The fixes for Shared projects and PCL projects are now both included in the latest version of Xamarin Studio that has been published to the Beta channel today: Xamarin Studio
Comment 34 Paul Mace 2016-07-21 00:37:08 UTC
Not fixed.
Comment 35 Paul Mace 2016-07-21 00:42:59 UTC
Created attachment 16738 [details]
screen cap of XS Mac

No change with XS 6.0.2 and PCL project.
Comment 36 Brendan Zagaeski (Xamarin Team, assistant) 2016-07-21 00:56:05 UTC
@Paul, I have verified that my test case from Comment 12 is fixed on the current Beta version of Xamarin Studio in my environment.

I assume you have updated to _specifically_ (and not an earlier build).

If you are indeed still able to replicate the problem with, then we will need a new bug report.

- If you can replicate the problem using the test case from Comment 12 and those steps to replicate, then please use that test case and those steps to replicate as the starting point for the new bug.  In that case, the next "process of elimination" question will be "what is different about your environment compared to my test environment?"  So any information you can provide on the new bug report that might help address that question would be good.

- If you can _not_ replicate the problem using the test case from Comment 12, but you _can_ replicate the problem with another project, please minimize your project to the smallest sample that still demonstrates the problem and attach that sample (optionally privately so that it's only visible to the Xamarin team) on the new bug report.  (The next "process of elimination" question at that point is of course "what is different about your sample compared to the test case from Comment 12?")

Thanks in advance.
Comment 37 Cliff Cawley 2016-07-21 10:32:52 UTC
I can confirm that this has been fixed in, thanks!
Comment 38 Mittchel van Vliet 2016-07-22 08:56:35 UTC
I am still having the same issue with (sadly). 

Any solutions for this?
Comment 39 Mittchel van Vliet 2016-07-22 08:58:19 UTC
Any remarks:

For some reason it builds the same Xaml.cs file into the Obj/Debug folder which causes the problems. I even disabled Xaml Compilation.
Comment 40 Paul Mace 2016-07-22 15:30:27 UTC
So, strange behavior:

.69 did not fix problem, BUT...

Per Brendan's followup, I downloaded the test case.

Of course, it showed no problem.

Per Brendan's next step, I created a new PCL Forms project in Visual Studio, closed it and then reopened it in Xamarin Studio on the Mac.

No problem.

Next morning I reopened my current work project and...NO PROBLEM.


Why did opening and closing the test case and/or the new VS project make the A==A intellisense bug disappear?  Some fundamental XS Option/Setting/Flag got changed by the Test case or new VS generated project?

So, fellow wounded code-warriors, try what I did and see if that makes the pain go away.
Comment 41 shaun.burch 2016-07-22 15:51:10 UTC
Sorry to bother, is there a timeline for fix in to move from beta to stable channel? Currently affected by this bug but wary of moving to beta channel as current project is on a strict deadline.

Thank you all for the quick work on this.
Comment 42 Brendan Zagaeski (Xamarin Team, assistant) 2016-07-25 19:32:03 UTC
The tentative timeline is by the end of July.  The best first place to check for release timelines is the Release Blog.  In this case, the blog post [1] indicates a tentative Stable timeline of "July 2016".

[1] https://releases.xamarin.com/beta-release-cycle-7-service-release-1-updated/
Comment 43 Rafael Veronezi 2016-07-25 19:43:56 UTC
Still having same issue here with the beta.
Comment 44 Brendan Zagaeski (Xamarin Team, assistant) 2016-07-25 19:50:55 UTC
@Rafael, @Mittchel, please see Comment 36.
Comment 45 Mikalai Daronin 2016-07-25 20:35:56 UTC
That issue was gone only after I've removed all unnecessary files by "git clean -fdX".
Comment 46 Shane 2016-07-28 20:39:29 UTC
I've been going back and forth between stable and beta for this issue and in addition I  had to delete my bin/obj folders for my 3 projects. So if you update to beta and are still seeing this, try also deleting bin/obj folders and rebuilding. Fixed it for me.
Comment 47 Paul Mace 2016-07-28 20:47:10 UTC

Simply deleting bin and obj did not fix it for me. Neither does 'Clean"

What does 'fix' it is loading the bug test sample, or any other plain vanilla new pcl project and closing it and then reopening my project.  That seems to reset it.

It is not cured, for sure, and came back once just before the .70 update.  I'm still puzzled as to why.
Comment 48 Chad 2016-08-01 04:27:45 UTC
This is still an open issue - even with Xamarin studio 6.0.2 update!  Xamarin knows it, too.  This has been such a time-waster for me...  having to manually look up all the properties and methods within my own classes!
Comment 49 David Karlaš 2016-08-01 04:32:17 UTC
Hi all,

I'm very sorry for all your problems but until we get some reproduction steps, there is not much we can do, so if anyone can read https://bugzilla.xamarin.com/show_bug.cgi?id=41572#c36 and respond to it, it would be awesome!

Thanks in advance!
Comment 50 Chad 2016-08-01 04:33:36 UTC
Created attachment 16845 [details]
Still here.

Bug is still here - even with 6.0.2 (build 73)
Comment 51 David Karlaš 2016-08-01 04:55:02 UTC
Can you also reproduce problem using the test case from Comment 12? Like Comment 36 asks?

If you can't I totally believe you, you still have this problem. But what I suggest you to do, is work with me on helping me reproduce this and I will do my best to fix this ASAP.

I think if you could send me your .sln and .csproj files without source code files(.cs) that would be enough for me to reproduce your issue... If that is doable for you, you can send it to david.karlas@xamarin.com

Thanks in advance!
Comment 52 daniel.k.waters 2016-08-01 11:15:40 UTC
Guys this is also happening to me on a brand new project but it only began happening after upgrading from Xamarin Forms 2.0.x to Xamarin Forms 2.3.x.  

This leads me to believe that the issue is not with the Xamarin Studio Release at all since it ALSO happened to me when I tried it from within Visual Studio 2015 Enterprise.  

Same behavior occurred in VS2015.  Project was fine, InitializeComponent compiled without issue and did not give red squiggles.  Now, red squiggle shows up AND the project compiles but all Controls do not respond to touch/click gestures.  This is on a fresh and up-to-date install of VS.  

So we might be looking in the wrong place with the Xamarin Studio version. Forms dll itself might be the culprit.  

My 2c.  Thanks!

Comment 53 Chad 2016-08-01 18:07:07 UTC
I'll try to package this in the next day or two.  I'm a bit tied up at the moment.   It's a large sln with quite a few projects (PCLs, iOS, Android, Windows).
Comment 54 David Karlaš 2016-08-02 13:05:21 UTC
@Dan: I did try creating new project and upgrading packages to 2.3, but without success :(

@Chad I would really appreciate that.
Comment 55 daniel.k.waters 2016-08-02 13:56:39 UTC
Does without success mean that you didn't get it to fail, or that you didn't get it to work?  :-)

I will also try to come up with repro steps, as I realize that its cause might be elusive.  If I can come up with a way to reliably repro the behavior I will provide a .sln.  


Comment 56 David Karlaš 2016-08-02 13:58:31 UTC
I meant I didn't have success reproducing problem. :(
Comment 57 daniel.k.waters 2016-08-02 14:00:16 UTC
Gotcha.  I will give it a try this evening.  Thanks!
Comment 58 vinnievivace 2016-08-02 21:12:50 UTC
just adding my voice here. Upgraded to 6.0.2 (build 73) yesterday. Release notes state this bug is fixed. Im still seeing the problem, even after deleting all bin/obj folders, restarting Xamarin, clean and build etc.

I don't have the time (or to be honest the inclination) to try and step thru the issue. I can say I have the CarouselView package installed if thats any help.
Comment 59 daniel.k.waters 2016-08-03 22:37:31 UTC
The latest builds of the Xamarin libraries in Visual Studio and Xamarin Studio fixed this problem for me.  All is well.  Thanks guys for your help!
Comment 60 David Karlaš 2016-08-04 14:59:47 UTC
Hi everyone who still have this problem,

first I want to thank Chad for sending me his .csproj and .sln files which helped me find out what problem is... Appears that problem is if "Default namespace" differs from "Project name"...(I opened new Bug 43056 to track this).

So here are 3 options:
a) Change "Default namespace" in your project settings to match "Project name"
b) I created new build of XS based on latest Cycle7(XS 6.0), notice this build was not QAed but only change is my fix for this bug:
Mac: https://bosstoragemirror.blob.core.windows.net/wrench/monodevelop-lion-cycle7bug43056/71/71a55609be86840306385945787081f6c28893cc/XamarinStudio-
Windows: https://bosstoragemirror.blob.core.windows.net/wrench/monodevelop-windows-cycle7bug43056/71/71a55609be86840306385945787081f6c28893cc/XamarinStudio-
c) Wait for Cycle8(XS 6.1) to be released(at least 1 month away(Alpha/Beta channel might be sooner, but I suggest against using Alpha/Beta channel for producing release builds)).

If anyone decides to download this build, please give me feedback if it's working for you or not.

I would like to apologise for all problems this bug caused you, but I really couldn't figure out what problem is until now.

Comment 61 Paul Mace 2016-08-04 19:17:24 UTC
Thanks, David.  Much more plausible solution.  This first cropped up for me when I moved a project from VS 2015 to the Mac, where those two values did indeed get changed. Fingers crossed but much greater confidence this will stay fixed.
Comment 62 Chad 2016-08-04 20:47:06 UTC
Thank you, David!  The namespace workaround suffices for now.  I never would've thought to mess in that area.  Great work.
Comment 63 Rafael Veronezi 2016-08-05 03:33:41 UTC
I'm still having the same issue with projects that have the same name as the Default Namespace. The problem persists on a Shared Library project that is brand new. Also I'm having other kinds of issues with the editor like, when adding a "x:Name" attribute to an Element of the XAML, it  doesn't appear to the Code Behind file before a full Clean/Build, the editor keeps displaying that the name doesn't exists in the context.

Pretty upset with the quality of those last releases!
Comment 64 Rafael Veronezi 2016-08-05 03:35:35 UTC
Notice that this bug is critical usability issue and is running for almost 2 months by now.
Comment 65 David Karlaš 2016-08-05 06:59:22 UTC
Hi Rafael,

I'm sorry to hear that... We are aware that XS 6.0 regressed in some areas, thats because we switched whole type system to Roslyn... :(

You are saying "The problem persists on a Shared Library project that is brand new.".
Would you be kind enough to upload this solution?

About other issue you have with x:Name... Can you open new bug report with steps to reproduce if you know them?

Thank you,
Comment 67 Rafael Veronezi 2016-08-08 16:15:48 UTC
Hi @David,

I thank you for your attention. I can send you the code but I need to do this via private channel since it's not actually an Open project.

For the x:Name bug I actually didn't found the trigger of the bug, it's kind of intermittent, so when I find the correct way to reproduce this I will a new thread.

I understand the impact of a huge change like the Rosyling one, and I hope that by the release of Cycle 8 all those problems are gone.

Comment 68 David Karlaš 2016-08-09 08:24:59 UTC
Hi Rafael,

can you please open new bug and mark it as private with reproachable project, or send email with reproachable project to david.karlas@xamarin.com?

Thank you,
Comment 71 Cliff Cawley 2016-08-29 23:55:22 UTC
This one has resurfaced for me. It was fixed for me in but I'm currently using XS Version 6.0.2 (build 73) and it seems to be back.
Comment 72 Brendan Zagaeski (Xamarin Team, assistant) 2016-08-30 02:08:24 UTC
@Cliff, please try the current Beta version Xamarin Studio, which includes at least one additional fix related to this issue.  As a quick initial test, I re-verified that the test scenario from Comment 12 is OK on the current Beta version.  If the problem persists on or newer (you an also try temporarily moving or deleting the `bin` and `obj` folders to be thorough), then please do file a new bug report (optionally marked private), and attach your `.csproj` and `.sln` files on that bug as discussed in the earlier comments in this bug report.  Thanks in advance!
Comment 73 Paul Mace 2016-09-01 16:59:46 UTC
This is back in .5383
Created new Forms project in VS 2015
Copied to Mac
Opened in XS Mac
InitializeComponent(); UNDERLINED!
Comment 74 Paul Mace 2016-09-02 16:18:58 UTC
This does not appear when the project is created on the Mac...only when started on windows and copied to the Mac.
Comment 75 David Karlaš 2016-09-02 16:20:03 UTC
Could you zip and attach this project to bug report?
Comment 76 Chad 2016-09-02 16:25:12 UTC
Interesting.  Lately I've not been moving back and forth between windows and mac.  Since the workaround for this issue, I've stayed on Xamarin Studio and Mac exclusively (for now); this issue has not resurfaced for me.  I will say there's a bunch of other flaky items in Xamarin studio (latest stable and beta), but that's another topic(s) for another day...
Comment 77 Paul Mace 2016-09-02 16:44:33 UTC

Of course I cannot replicate this this morning. And I don't have time, at the moment, to go back to VS2015 and start from scratch. I imagine you are as frustrated as we are by this.  As soon as it crops up again (and it will), I'll send you the zipped project.

Chad--yup.  I abandoned Win-Mac back and forth yet again yesterday as the problems grew to the uninstall/reinstall all level.  UWP is just gonna have to wait till IOS/Android part of project is stable on the mac.
Comment 78 Shruti 2016-09-08 12:04:54 UTC
I have verified this issue with the latest cycle 8 patch build provided in the trello card, i.e.

XS 6.1 (build 5435)

Build Information
Release ID: 601005435
Git revision: 609ffe387ef3b41964bd6e60705b6ec68416d10a
Build date: 2016-09-07 18:20:42-04
Xamarin addins: 2af2676882a536a5c004981048fdd002a972a084
Build lane: monodevelop-lion-cycle8bug41572space

And have observed that now it is working fine. Below are the steps I followed;

1. Created a Xamarin.Forms application in XS
2. Create a Path which has spaces in it for example "Archive (10)"
3. Move the project from it's previous location to the new location, i.e. /"Archive (10)"
4. Now Open XS and Open the project
5. The project opened successfully.

Please merge this fix in the cycle 8 branch so that we may verify this issue there and can close it.
Comment 79 xamarin-release-manager 2016-09-08 19:11:05 UTC
Fixed in version (cycle8)

Author: Lluis Sanchez
Commit: 11507a143e08fd53b3ef483051a1797ef2d474d0 (xamarin/md-addins)
Included in Commit: 804ac0cd867fff4ca054c1a95fbe05a5df75192e (mono/monodevelop)
Comment 80 Chad 2016-09-09 00:46:45 UTC
Damn it.  Now I got it with latest beta release today.  Ugh...  Besides this, there is soooo much in the way of issues with the latest versions of Xamarin Studio, I don't even know where to begin.  All I know is that I get about 1/3 done everyday because of these issues - including debugging problems, too!  I wish I could sue.  Really.  I'm under pressure, under the gun, and clients don't care or believe that a company's development product can really do that much damage to a deadline.  Xamarin Studio has and does cause me tremendous stress these days!
Comment 81 Shruti 2016-09-09 06:33:42 UTC
I have verified this issue with the latest cycle 8 builds, i.e.

XS 6.1 (build 5440)

Build Information
Release ID: 601005440
Git revision: 804ac0cd867fff4ca054c1a95fbe05a5df75192e
Build date: 2016-09-08 15:31:26-04
Xamarin addins: e8ba546274ec424c11709db468bb07ad9f276c9d
Build lane: monodevelop-windows-cycle8

And have observed that it is working fine with this build as well. Below are the steps I followed;

1. Created a Xamarin.Forms application in XS
2. Create a Path which has spaces in it for example "Archive (10)"
3. Move the project from it's previous location to the new location, i.e. /"Archive (10)"
4. Now Open XS and Open the project
5. The project opened successfully.
Comment 82 roll 2016-10-27 18:18:36 UTC
For me this bug is not fixed.

Xamarin Studio Community
Version 6.1.1 (build 15)
Installation UUID: 240e0342-534d-42d7-8db7-a759f43a0726
	Microsoft .NET 4.0.30319.42000
	GTK+ 2.24.26 (Dark theme)
	GTK# 2.12.38


Not Installed

Version: (Xamarin Studio Community)
Android SDK: C:\Programs\AndroidSdk
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.2

Java SDK: C:\Programs\Java32\jdk1.7.0_79
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) Client VM (build 24.79-b02, mixed mode, sharing)

Android Designer EPL code available here:

Xamarin Android Player
Version: 0.6.5
Location: C:\Programs\XamarinPlayer\DeviceManager.exe

Build Information
Release ID: 601010015
Git revision: fa52f02641726146e2589ed86ec4097fbe101888
Build date: 2016-09-22 08:12:03-04
Xamarin addins: 75d65712af93d54dc39ae4c42b21dfa574859fd6
Build lane: monodevelop-windows-cycle8-sr0

Operating System
Windows 6.1.7601.65536 (64-bit)

To reproduce the bug:
1. Press "New Solution..." in Xamarin Studio
2. Use "Xamarin Forms App" (C#)
3. Set Target Platform to "Android"
4. Set Shared Code to "Use Shared Library"
5. Keep checkbox "Use XAML for user interface files" checked
6. The solution builds OK and "InitializeComponent()" is not marked as error
7. Close solution
8. Open solution
9. "InitializeComponent()" is marked as error
Comment 83 roll 2016-10-27 18:23:47 UTC
Created attachment 18252 [details]
bug is not fixed in XS 6.1.1

Create plain test solution (Use Shared Library) with XS 6.1.1 -> close -> reopen solution -> bam
Comment 84 Fred 2017-03-21 20:03:01 UTC
As for me, I still have the issue with XS 6.2 build 1829 i.e the latest build to date.
Comment 85 Brendan Zagaeski (Xamarin Team, assistant) 2017-03-21 20:29:13 UTC
By default the best option in cases like Comment 82 - Comment 84 (especially on a bug that has been marked "verified fixed" for a little while) is to file a new bug report.  So for any appearances of similar issues in Xamarin Studio versions higher than, please file new bug reports (optionally marked private), being sure to attach your `.csproj` and `.sln` files on the new bugs as discussed in the earlier comments in this bug report.

New bug reports have the added advantages (a) that the reporter of each bug has the option to change the Status of the bug based on the results in their exact scenario (reopening the bug as needed, for example), and (b) that comments on "verified fixed" bugs aren't as visible to the engineering team for prioritization as new bug reports.  Thanks in advance!

Comment 86 roll 2017-03-21 20:55:37 UTC
A "new" bug report was created by me 5 months ago. Please see bug ID 46173.
For me it seems that someone then copied the comments of bug ID 46173 to this bug report (41572).