Bug 56343 - Android error when building: The type or namespace name 'YX' does not exist in the namespace 'XY'
Summary: Android error when building: The type or namespace name 'YX' does not exist i...
Alias: None
Product: Live Player
Classification: Xamarin
Component: IDE Extension ()
Version: 1.0.253
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-05-13 11:18 UTC by Caan Mee
Modified: 2017-07-31 18:23 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Live Player Error (64.11 KB, image/png)
2017-05-13 11:18 UTC, Caan Mee

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 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 Caan Mee 2017-05-13 11:18:14 UTC
Created attachment 22156 [details]
Live Player Error

When trying to build the App via the Live Player the following error messages (screenshot) appears:

"MainActivity.cs: The type or namespace name 'IMyService' does not exist in the namespace 'Test.App' (are you missing an assembly reference?)

We use the default Xamarin.Forms template created "App.xaml/cs" from the MainActivity when another error pops up:
"MainActiviy.cs" 'App' is a namespace but is used like a type.

Using the latest VS 2017 Preview (Win10 x64) with all Xamarin Updates (followed the setup guide), target device is an Android LG G5.

All error messages relate to the referenced PCL.

The project was created by using the default Xamarin.Forms MasterDetail PCL template in VS 2017.
Comment 1 Lance 2017-05-17 22:40:36 UTC
Can confirm that this also happens when creating a non-forms PCL app as well. All classes that cause errors, originate from the PCL.
Comment 2 Walid 2017-05-18 03:59:00 UTC
Please note that the project in question would compile / builds fine and will run correctly on the device itself (when run directly). The "errors" are only reported when run through the Player.
Comment 3 James Montemagno [MSFT] 2017-05-30 18:08:51 UTC
Have you tried the "Blank" Xamarin.Forms application and started there. The default MasterDetail has some limitations and not supported out of the box with the live player, but we are updating the templates as I type this.

Have you tried out my samples: https://forums.xamarin.com/discussion/95400/samples-from-build-2017-sessions#latest
Comment 4 Frank A. Krueger 2017-05-30 23:56:26 UTC
PCL support has been improved since the last release.
Comment 5 James Montemagno [MSFT] 2017-07-31 18:23:17 UTC