IntelliSense Support in Visual Studio 2010

Sep 13, 2010 at 10:01 PM
Edited Sep 13, 2010 at 10:14 PM

Hi All,

I can not get IntelliSense for aml to work after applying patch (http://sandcastlestyles.codeplex.com/) to the 2.6.1062.1 version.

I got the files copied to a sub foder in "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Xml\Schemas\Sandcastle". 

Create a SandcastleIntelySense.xml in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Xml\Schemas.

here the content of the SandcastleIntelySense.xml:

 

<?xml version="1.0" encoding="UTF-8"?>
<SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">
	<Association extension="aml" schema="%InstallRoot%/xml/schemas/Sandcastle/developer.xsd" />
</SchemaCatalog>

 

what am I doing wrong?

The warnings that I see in VS.

Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.	C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\schemas\Sandcastle\developer.xsd

 and this is where the warnings are coming from 

<include schemaLocation="./developerStructure.xsd" />
<include schemaLocation="./developerReference.xsd" />
<include schemaLocation="./hierarchy.xsd" />
<include schemaLocation="./glossary.xsd" />

also

warinigs

  • Warning 81 Cannot resolve the 'schemaLocation' attribute. C:\Program Files (x86)\Microsoft Visual Studio 10.0\Xml\Schemas\Sandcastle\developerStructure.xsd 37 6 Miscellaneous Files
  • Warning 95 Reference to undeclared attribute group 'http://ddue.schemas.microsoft.com/authoring/2003/5:contentIdentificationSharingAndConditionGroup'. C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\schemas\Sandcastle\hierarchy.xsd 25 4
  • Warning 100 Type 'http://ddue.schemas.microsoft.com/authoring/2003/5:emptyType' is not declared. C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\schemas\Sandcastle\developerReference.xsd 125 6 Miscellaneous Files


and more

Thanks,

Igor

 

Sep 13, 2010 at 11:21 PM
Edited Sep 13, 2010 at 11:23 PM

Hello Igor,

Sandcastle Styles is not changed the schema, so simply ignore that part.

Each release of the VS makes changes to the schema catalog, you can hardly understand why.

I was not using the Visual Studio 2010 for development, do not like it. But I have just done this to get
the Intellisense to work, a modification of what I did for Visual Studio 2008:

  1. Copy all the Sandcastle schema to a folder in the ...Xml\Schema folder, mine is named "Authoring" 
  2. Open the base.xsd schema file in the "Authoring" folder and change the line...(not needed for VS2008)
    <import schemaLocation="xlink.xsd" namespace="http://www.w3.org/1999/xlink"/>

    to the following...
    <import schemaLocation="../xlink.xsd" namespace="http://www.w3.org/1999/xlink"/>
  3. This is my schema catalog definition file for the Sandcastle schema, which also works with the Visual Studio 2010

Named the ConceptualSchema.xml...

 

<SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">
  <Schema href="%InstallRoot%/xml/schemas/Authoring/base.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/baseConditional.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/block.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/blockCommon.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/blockSoftware.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/conditionSet.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/developer.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/developerReference.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/developerStructure.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/glossary.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/hierarchy.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/inline.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/inlineCommon.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/inlineLinking.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/inlineSoftware.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/inlineUi.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/structure.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/structureList.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/structureMedia.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/structureProcedure.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>
  <Schema href="%InstallRoot%/xml/schemas/Authoring/structureTable.xsd"
          targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5"/>        
</SchemaCatalog>

Basically, the VS will recognize the *.aml file as an XML, so the file association is not really needed.
You may want to define the associated if you really need it, but I have not tested it, the above works
with *.xml, *.aml, and *.maml files on my machine. 

 

NOTE: Please line wrap your post to shorten the lines. On even 19' monitor, I could still not read without
horizontal scrolling.

Best regards,
Paul. 

Sep 14, 2010 at 6:25 PM

Hi Paul,

Thanks for your reply.

Unfortunately it still does not work. e.G. I get now the warning that the space is already defined.

Warning	2	The global attribute 'http://www.w3.org/XML/1998/namespace:space' has already been declared.	
C:\Program Files (x86)\Microsoft Visual Studio 
10.0\Xml\Schemas\Authoring\space.xsd

If i remove space.xsd and repoint the import schemaLocation to ../xml.xsd I get 44 warnings

I guess the main issue are these 5 warnings

Warning	3	Request for the permission of type
 'System.Security.Permissions.FileIOPermission, mscorlib, 
Version=4.0.0.0, .....' failed.	C:\Program Files (x86)\Microsoft Visual Studio 10.0\xml\schemas\Authoring\developerStructure.xsd

and this are the 5 problems in developerStructure.xsd

<import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="../xml.xsd"/>
<include schemaLocation="baseConditional.xsd"/>
<include schemaLocation="inline.xsd"/>
<include schemaLocation="block.xsd"/>
<include schemaLocation="structure.xsd"/>

I guess it is a VS problem. To bad how ever, IntelliSense provides much better productivity then without.

Sep 14, 2010 at 10:56 PM

Hello Igor,

Taking a closer look, the FileIOPermission is strange. I have not received this as part of schema issue.
I do not know if this is related to the 64-bit OS. But can you work on this first?

May be try using another machine to test this. I will also try this today on my workplace machine, but
it is still not 64-bit OS.

Best regards,
Paul. 

Sep 15, 2010 at 7:02 AM

Hello Igor,

I have done this on the workplace machine running Visual Studio 2010 Ultimate and the changes
done to base.xsd and developerStructure.xsd (forget it was done on my home schema set) was all
need to get it working correctly.

I have also tested this with the Sandcastle Styles (which mistakenly is packed with the VS 2005 *.xsx editor files).
With and without the editor files, the result is the same, so please check the state of your configurations. There is
no problem here.

Best regards,
Paul.

Sep 15, 2010 at 7:32 AM

Just in case there is any doubt, I have uploaded screenshots from the use of the IntelliSense...

IntelliSense for Sandcastle Schema

Best regards,
Paul. 

Sep 15, 2010 at 1:37 PM

Hallo Paul,

I do belief you if you say, that it is working on your machine. Would it be possible to get your schema files? The working ones? who knows, may be something is wrong with my.

I did not find any solution so far for the issue. I am going to post it on VS forum. I can let you know if something comes up.

 Thanks a lot for your support.

Best regards,

Igor

Sep 16, 2010 at 12:43 AM

>>Igor:  Would it be possible to get your schema files?

I do not know if this will make any difference, since for the Sandcastle Styles at my workplace, I just downloaded
it and used the schema - I do not override the Sandcastle installation.

Please contact me directly by my profile here, and I will send them to you. I do not currently have/use any web storage.

Best regards,
Paul.