Forum Xamarin Cross Platform with Xamarin

Visual Studio 2012, AXML, local namespace

I've managed to get IntelliSense in VS2012 mostly working on my AXML files, by correcting the contents of
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Xml\Schemas\monodroidcatalog.xml

However, it does not seem to recognise the "local:" namespace I've declared as:
xmlns:local="http://schemas.android.com/apk/res-auto"

I'm using mvvmcross, and I have Resources/Values/MvxBindingAttributes.xml set as AndroidResource. All my "local:MvxBind" attributes have warnings against them, and there is no IntelliSense for the "local:" namespace.

The application compiles and runs fine.

Is there any way to get the VS xml editor to see "local:" ?

Thanks, Ben.

Posts

  • RickElliottRickElliott USUniversity ✭✭

    Ben, out of curiosity, would you mind sharing what changes you made to the monodroidcatalog.xml file to get XML intellisense working? I've been missing intellisense in the AXML files myself. :/ Any help would be greatly appreciated. :) Thanks.

  • BenGladman.7238BenGladman.7238 GBMember

    Sure, here it is:

    <SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">
    
      <!-- original xml
      <Schema href="%ProgramFiles%/MSBuild/Novell/android-layout-xml.xsd" />
      <Schema href="%ProgramFiles%/MSBuild/Novell/schemas.android.com.apk.res.android.xsd" targetNamespace="http://schemas.android.com/apk/res/android" />
      <Association extension="axml" schema="%ProgramFiles%/MSBuild/Novell/android-layout-xml.xsd" />
      -->
    
      <Schema href="%ProgramFiles(x86)%/MSBuild/Xamarin/Android/android-layout-xml.xsd" />
      <Schema href="%ProgramFiles(x86)%/MSBuild/Xamarin/Android/schemas.android.com.apk.res.android.xsd" targetNamespace="http://schemas.android.com/apk/res/android" />
      <Association extension="axml" schema="%ProgramFiles(x86)%/MSBuild/Xamarin/Android/android-layout-xml.xsd" />
    
    </SchemaCatalog>
    
  • BenGladman.7238BenGladman.7238 GBMember

    ... oops, not sure what happened to the linefeeds in that xml, it looked fine in the edit area!

  • RickElliottRickElliott USUniversity ✭✭

    Ben, thanks for the reply. Interestingly enough, my monodroidcatalog.xml file is identical to the changes you have above (minus the 'original xml' section of course). Sadly, I still have no IntelliSense in my axml files. :( Just for grins, here's my monodroidcatalog.xml for reference:

    <SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">
      <Schema href="%ProgramFiles(x86)%/MSBuild/Xamarin/Android/android-layout-xml.xsd" />
      <Schema href="%ProgramFiles(x86)%/MSBuild/Xamarin/Android/schemas.android.com.apk.res.android.xsd" targetNamespace="http://schemas.android.com/apk/res/android" />
    
      <Association extension="axml" schema="%ProgramFiles(x86)%/MSBuild/Xamarin/Android/android-layout-xml.xsd" />
    </SchemaCatalog>
    

    I'm guessing the Xamarin folks probably updated it as I made no changes. You didn't have to make any other changes besides this file? Just looking for the missing link as to why it doesn't work for me. Thanks for the post, I appreciate it.

Sign In or Register to comment.