Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin.Android Intellisense not working in Visual Studio 2010

I'm testing out Xamarin.Android in Visual Studio 2010 and have noticed that I have no Android Intellisense when I'm working in an Android Layout (.axml) file. However, I do get Android Intellisense when I'm working in a .cs file.

Example:

Here is a screenshot of my Main.axml file that lives in my Layout directory. Notice how the intellisense doesn't contain anything within the Android namespace.

No Android Intellisense example

What do I need to do to get intellisense to display the Android namespace in a .axml file?

like image 848
Jed Avatar asked Jun 21 '13 22:06

Jed


People also ask

How do I enable IntelliSense in Visual Studio 2010?

The fix was to look in Visual studio menu: Resharper > options Then select IntelliSense > General -> use IntelliSense features of: Visual Studio.

How IntelliSense work?

IntelliSense is a code-completion aid that includes a number of features: List Members, Parameter Info, Quick Info, and Complete Word. These features help you to learn more about the code you're using, keep track of the parameters you're typing, and add calls to properties and methods with only a few keystrokes.


1 Answers

Kannan Balasubramanian has posted an answer that worked for me (Binary Bits)

Here's Kannan's solution:


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” You should be able to see 2 files “android-layout-xml.xsd” and “schemas.android.com.apk.res.android.xsd”
  8. Copy these 2 files to “\Microsoft Visual Studio 11.0\Xml\Schemas”
  9. Again open the “Schemas…” menu as mentioned in steps 3&4
  10. Now click “Add…” button and add these 2 files which should be located as mentioned in step 7 & 8
  11. Now restart visual studio and the XML editor for design layout should work fine with Intellisense
  12. From step 5….
  13. If above steps don’t work, then close the Visual Studio 2012.
  14. Now open “Developer command prompt for VS2012″ under Windows programs menu.
  15. Type “Devenv /ResetSettings” without quotes.
  16. Launch Visual Studio 2012 and see if Intellisense works.
  17. If still not working, better go to Xamarin forums and post there.

like image 138
Jed Avatar answered Nov 15 '22 23:11

Jed