Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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 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.
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
Please, see readme.txt for step-by-step instructions
I've been seeing this exact issue for months now.
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 220.127.116.1171
To the Xamarin Team: Just for initial cross-referencing, this looks like a possible duplicate of Bug 32988.
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.
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 ***