Categories
Android Applications Web

Intellisense for AXML files doesn’t work in Visual Studio 2012

Most of the people who work with Xamarin’s Mono for Android in Visual Studio 2012 face a bug where Intellisense doesn’t work for AXML in source view.

One of the fix which worked for me is mentioned below.

  1. Launch Visual Studio 2012
  2. Open a solution with .AXML file in it
  3. Now XML main menu should be visible on top
  4. Open “Schemas…” menu
  5. Sort by “File Name” column and see if “android-layout-xml” and “schemas.android.com.apk.res.android” are there. If found, skip to step 13
  6. If not found, go to “Program Files” if 32-bit system or “Program Files (x86)” if 64-bit system.
  7. Then go to “\MSBuild\Novell” or “\MSBuild\Xamarin\Android”
  8. You should be able to see 2 files “android-layout-xml.xsd” and “schemas.android.com.apk.res.android.xsd”
  9. Copy these 2 files to “\Microsoft Visual Studio 11.0\Xml\Schemas”
  10. Again open the “Schemas…” menu as mentioned in steps 3&4
  11. Now click “Add…” button and add these 2 files which should be located as mentioned in step 7 & 8
  12. Now restart visual studio and the XML editor for design layout should work fine with Intellisense
  13. From step 5….
  14. If above steps don’t work, then close the Visual Studio 2012.
  15. Now open “Developer command prompt for VS2012” under Windows programs menu.
  16. Type “Devenv /ResetSettings” without quotes.
  17. Launch Visual Studio 2012 and see if Intellisense works.
  18. If still not working, better go to Xamarin  forums and post there.

8 replies on “Intellisense for AXML files doesn’t work in Visual Studio 2012”

This problem is not solved in my machine, i type a command “Devenv /ResetSettings”  in Developer command prompt for VS2012 but it shows like this. ” ‘devenv’ is not recognized as an internal or external command,
operable program or batch file. “

    Open command prompt
    Change directory to “C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\”
    Type the command.

Note:

    If you have 64-bit windows then replace “Program Files” with “Program Files (x86)”
    Microsoft Visual Studio xx.x will vary based on your version of Visual Studio, hence search for the directory “Microsoft Visual Studio xx.x” whose “CommonX\IDE” sub-folder should have “devenv.exe”, where X is a number.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.