How to enable intellisense on Xamarin.Android'

2019-06-17 01:48发布

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

2条回答
别忘想泡老子
2楼-- · 2019-06-17 02:14

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

查看更多
狗以群分
3楼-- · 2019-06-17 02:41
  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
查看更多
登录 后发表回答