3

I am trying to make Intellisense work for my XML files but unable to do so. In the properties of my XML files I have specified wss.xsd in Scehmas attribute. But still no suggestions for tag or attributes show up while editing XML file. I followed the steps suggested in this answer on StackOverflow.

And the strange thing is that I cannot edit my Schemas attribute for properties for XML file. It always includes these XSD files:

C:\Program Files (x86)\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\CamlQuery.xsd
C:\Program Files (x86)\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\camlview.xsd
C:\Program Files (x86)\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\coredefinitions.xsd
C:\Program Files (x86)\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\cui.xsd
C:\Program Files (x86)\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\wss.xsd
C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\CamlQuery.xsd
C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\camlview.xsd
C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\coredefinitions.xsd
C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\cui.xsd
C:\Program Files\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\XML\wss.xsd

enter image description here

If I unmark the schemas from Use column, click on OK button and again option the dialog the schema is again checked.

I addition I can see errors in my XML file like The attributeGroup 'http://schemas.microsoft.com/sharepoint/:invocationTagAttributeGroup' has already been declared. which I believe is because of so many CSD files as schemas.

Does anyone know why is this happening?

I am using SharePoint 2013 and Visual Studio 2013 Ultimate edition.

Community
  • 1
  • 1
Naveen
  • 6,786
  • 10
  • 37
  • 85

2 Answers2

0

In the root element of your xml you should have the attribute xmlns="http://schemas.microsoft.com/sharepoint". Remove any other xmlns attributes while you are debugging this.

Mike Hixson
  • 5,071
  • 1
  • 19
  • 24
  • The root element looks like this ``. It has `xmlns` attribute and `xmlns:ows` attribute as well. I removed the `xmlns:ows` attribute but it didn't work. – Naveen Jul 04 '14 at 07:10
  • Can you try checking "use" on only one of the sharepoint schemas in vs? – Mike Hixson Jul 04 '14 at 07:23
  • That is another problem I am facing which I mentioned in my question. I am unable modify my `Use` column. I uncheck them click on OK and if I open it again all the checks are there as is. – Naveen Jul 04 '14 at 07:25
  • can you click remove? – Mike Hixson Jul 04 '14 at 07:29
  • 1
    Tried it and it comes back again. Ran Visual Studio as administrator but still the same issue. This is really weird. – Naveen Jul 04 '14 at 08:24
0

Didn't fully solve the issue!

I finally renamed the folder:

C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\XML

to something like "XML - removed to avoid use in VS2013"

As soon as it was renamed, the Visual Studio editor stopped trying to use those XSD files.

Glen Little
  • 6,951
  • 4
  • 46
  • 68
  • So after this VS uses `wss.xsd` and Intellisense works? – Naveen Dec 11 '14 at 12:57
  • :( It seemed to for a while, then all the XML intellisense seemed to be gone. I had to restore that folder, and will have to live with the Sharepoint XSD interfering in the editor. – Glen Little Dec 15 '14 at 22:07