Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable intellisense on Xamarin.Android's AXML?

Since this great tool became free for everyone, I tried it, and I liked it especially Visual Studio Android emulator.

But, I got a problem because Visual Studio intellisense does not work at all for axml files.

I tried this article (https://kb.xamarin.com/customer/portal/articles/1920119-how-do-i-enable-intellisense-in-android-axml-files-) but those files (android-layout-xml.xsd, schemas.android.com.apk.res.android.xsd) does not exist in my PC

like image 636
danarj Avatar asked Apr 12 '16 16:04

danarj


2 Answers

  1. Download this two files (https://raw.githubusercontent.com/atsushieno/monodroid-schema-gen/master/schemas.android.com.apk.res.android.xsd and https://raw.githubusercontent.com/atsushieno/monodroid-schema-gen/master/android-layout-xml.xsd) to "C:\Program Files (x86)\MSBuild\Xamarin\Android" (if there is no such files there).
  2. Start "Developer Command Prompt for VS2015"
  3. Execute "devenv /resetsettings"
  4. Open *.axml file in your solution with "Open with" and select "Automatic editor selector (XML)" Automatic editor selector (XML)

  5. If intellisence still not working go to XML -> Schemas, add this schemas manually and restart visual studio.

  6. Enjoy! Intellisenseworks
like image 133
RavingDev Avatar answered Oct 14 '22 03:10

RavingDev


The XSD files are located at C:\Program Files (x86)\Xamarin Studio\AddIns\MonoDevelop.MonoDroid\schemas, note that this path exist when you install the Xamarin Studio.

I guess, we don't ship these files with Visual Studio plugin, I will have to confirm this with Xamarin.Android team.

Meantime you can find the schema files at https://forums.xamarin.com/discussion/comment/180685/#Comment_180685

like image 26
Prashant Cholachagudda Avatar answered Oct 14 '22 05:10

Prashant Cholachagudda