|Summary:||XAML IntelliSense only works when iOS target is set, not Android|
|Product:||Android||Reporter:||Pierce Boggan [MSFT] <pierce.boggan>|
|Severity:||blocker||CC:||alan, alo, ashley.gazich, brendan.zagaeski, chrisntr, cody.beyer, jimmy.garrido, jmt, joe, jon.goldberger, jonp, joseph, kzu, mono-bugs+bugzilla, mono-bugs+monodroid, parmendrak, pierce.boggan, prashant.cholachagudd, prchol, tim, v-jawasw|
|Tags:||Is this bug a regression?:||---|
|Last known good build:|
Description Pierce Boggan [MSFT] 2017-06-08 18:11:20 UTC
# Steps to reproduce 1. File -> New -> Cross-Platform -> Cross-Platform App -> Blank Forms App. 2. Open MainPage.xaml. 3. Try to type and get XAML IntelliSense. # Expected behavior XAML IntelliSense functions properly for Android target. # Actual behavior XAML IntelliSense functions properly only for iOS target, as seen here: https://www.screencast.com/t/zM8MJ6Qb # Supplemental info (logs, images, videos) Logs attached. # Test environment (full version information) Environment Info: https://gist.github.com/pierceboggan/5b5fba9ff76ed6f5841a0136303b9d4a
Comment 2 Adrian Alonso 2017-06-15 13:02:06 UTC
I could reproduce the issue. However after building the Android project and reopening the solution, the xaml intellisense started to work with any target selected. So probably the cause of the issue is some lack of metadata at the time of opening the solution. Since there are a couple of workarounds (selecting iOS or building Android and reoponing the solution) I would postpone this issue for 15.4, decrease importance from blocker to normal and also ping XAML lang service guys to take a look at it. Please let me know if you think we should tackle before 15.4
Comment 3 Alan McGovern 2017-06-16 09:30:40 UTC
*** This bug has been marked as a duplicate of bug 56629 ***
Comment 4 Alan McGovern 2017-06-16 09:30:53 UTC
Oops, wrong bug!
Comment 5 Pierce Boggan [MSFT] 2017-06-19 18:29:52 UTC
This issue is affecting the critical path of most of our users: File -> New -> Forms app. Even though there is a workaround, IntelliSense is a high visibility issue as developers expect it to just "work" out of the box. Issues affecting IntelliSense also affect first run, as there is no way for users to discover XAML controls from within the IDE (as there is no toolbox for XAML controls).
Comment 7 Jon Goldberger [MSFT] 2017-06-20 00:39:38 UTC
I just experienced this as well. However after building the solution and closing and re-opnening visual studio, although selecting Xamarin.Android as the target worked for Intellisense, selecting the UWP target did not. With the UWP target selected, I only got intellisense for UWP types, not Xamarin.Forms types.
Comment 8 Pierce Boggan [MSFT] 2017-06-20 20:04:43 UTC
*** Bug 45848 has been marked as a duplicate of this bug. ***
Comment 9 Adrian Alonso 2017-06-21 19:48:20 UTC
*** Bug 35075 has been marked as a duplicate of this bug. ***
Comment 10 Adrian Alonso 2017-06-21 19:48:52 UTC
*** Bug 34023 has been marked as a duplicate of this bug. ***
Comment 11 Juan Marcelo Tondato 2017-06-23 20:32:07 UTC
This issue is related to designTimeBuild, in this mode XA skip task `GetAdditionalResourcesFromAssemblies` and the cache required for `Aapt` task is not saved. Moving the bug to Android for visibility from the right team.
Comment 12 Juan Marcelo Tondato 2017-06-27 13:01:20 UTC
*** Bug 57275 has been marked as a duplicate of this bug. ***
Comment 13 Juan Marcelo Tondato 2017-06-28 20:32:42 UTC
*** Bug 52908 has been marked as a duplicate of this bug. ***
Comment 14 dean.ellis 2017-07-18 15:50:51 UTC
Pierce Can we retest this on d15-4? Cheers.
Comment 15 Jonathan Pryor 2017-07-18 15:52:24 UTC
This might be fixed by: https://github.com/xamarin/xamarin-android/pull/668
Comment 16 dean.ellis 2017-07-28 10:13:01 UTC
PR 688 did not fix the problem :/
Comment 17 dean.ellis 2017-07-28 12:38:50 UTC
We have a bit of a dilemma it seems. The warnings in the intelligence build come from the fact that the additional resources have not been downloaded. But we don't want to download them because they can take ages to get. So to fix them we need to download the resources. But we can't download the resources because it will probably lock up the IDE while it downloads. I'll investigate to see if there is a work around we can do
Comment 18 Pierce Boggan [MSFT] 2017-07-28 20:18:50 UTC
Also worth noting in my debugging with @Alan that this is only happening with Shared Projects, not library projects.
Comment 19 dean.ellis 2017-07-31 10:05:47 UTC
The reason it does not work for Shared projects is because they are built as part of the android app.. and its the android app that needs all the support libraries in place to build property. Currently that is not done for designative builds because of the problems with getting stuff from the internet (which might take a while and lock the IDE) I am in the process of Reworking GetAdditionalResourcesFromAssemblies. The idea being that in a DesignTimeBuild we can do everything BUT download zips.. So if the required resource files are in the android-idk/extras directory they will be extracted. However if the Task needs to hit the internet , it won't...(for desigtime) locking up the IDE for 10 minutes while it downloads something in a designative build is a HUGE problem, and will make things look allot worse for the user.
Comment 20 dean.ellis 2017-08-01 11:52:34 UTC
Hopefully this will be fixed by xamarin-android/master/1cd582ec This fix will only work IF the m2repository files are installed in android-sdk/extras. If they are not and the system needs to download the files, this bug will persist. There is nothing I can do about that until we start packaging the resources in the Nuget packages.