Bug 36657

Summary: Intellisense issues with XAML based views in PCL using any version Xamarin.Forms 1.4+
Product: Visual Studio Extensions Reporter: Stan Kolesnik <stanislav_kolesnik>
Component: Xamarin.FormsAssignee: Bugzilla <bugzilla>
Severity: normal CC: brendan.zagaeski, jas, jason, joe, kzu, m.kahmen, mono-bugs+bugzilla, pstevens, stanislav_kolesnik
Priority: ---    
Version: 4.0.0 (C6)   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Tags: Is this bug a regression?: ---
Last known good build:

Description Stan Kolesnik 2015-12-06 19:24:31 UTC
Creating Xamarin.Forms XAML files in a PCL projects causes intellisence errors, such as the ones listed below, however the build succeeds.

Error CS0234: The type or namespace name 'X' does not exist in the namespace 'Y' (are you missing an assembly reference?)
Error CS0246: The type or namespace name 'X' could not be found (are you missing a using directive or an assembly reference?)
Error CS0103: The name 'InitializeComponent' does not exist in the current context

The step-by-step repro is given in the following project: https://github.com/skolesni/Sample.XamarinIntellisenceIssue

The issue has been discussed on Xamarin forum here: https://forums.xamarin.com/discussion/55940/intellisense-issues-with-xaml-based-views-in-pcl-using-any-version-xamarin-forms-1-4
Comment 1 Stan Kolesnik 2015-12-06 19:25:22 UTC
Please, see readme.txt for step-by-step instructions
Comment 2 Paul Stevens 2015-12-06 21:11:36 UTC
I've been seeing this exact issue for months now.
Comment 3 Jason Michas 2015-12-07 20:45:59 UTC
Yes, this has become a huge problem. When you start to add more PCLs that are referenced by the core PCL you will get assembly reference errors for them making it very difficult to code anything that relates to the referenced PCLs.

For the record I am using VS2015 update 1, Resharper 10 and Xam Forms
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2015-12-07 21:51:09 UTC
To the Xamarin Team: Just for initial cross-referencing, this looks like a possible duplicate of Bug 32988.
Comment 5 Stan Kolesnik 2015-12-08 10:28:49 UTC
A part of it related to broken PCL links is indeed covered by Bug 32988 https://bugzilla.xamarin.com/show_bug.cgi?id=32988

The issue with missing InitializeComponent is not related to linked PCLs and looks like it is caused by the same buggy *.g.cs generator, but in a different way, so please make sure this issue is fixed as well.
Comment 6 Brendan Zagaeski (Xamarin Team, assistant) 2015-12-15 00:56:33 UTC
Ah yes indeed, that `InitializeComponent` problem has its own bug report under Bug 33181.

So to summarize, the symptoms described in Comment 0 are a combination of the following two bugs:

- Bug 32988
- Bug 33181

I will now close this bug as a duplicate of those bugs. (Because the title of this bug mentions PCLs, I will use Bug 32988 as the "main" duplicate.)

*** This bug has been marked as a duplicate of bug 32988 ***