Displaying Programming Information in the Object Browser

请直接行该文件:wp.bat

For this programming information to be visible in the Visual Studio Tools for Applications (VSTA) and Visual Studio development environments, you must copy the two .xml files from the InfoPath setup directory into the locations in the Global Assembly Cache (GAC) where each of the InfoPath assemblies are installed. To do that, you use the Command Prompt to copy the files as described in the following steps.

To copy the IntelliSense documentation files for the Microsoft.Office.InfoPath and Microsoft.Office.Interop.InfoPath.SemiTrust assemblies into the GAC:

  1. Open the Command Prompt.
  2. Execute each of the following commands, pressing Enter after each command:

cd \Program Files\Microsoft Office\Office12

copy Microsoft.Office.InfoPath.xml %windir%\Assembly\GAC_MSIL\Microsoft.Office.InfoPath\12.0.0.0__71e9bce111e9429c

copy Microsoft.Office.Interop.InfoPath.SemiTrust.xml %windir%\Assembly\GAC\Microsoft.Office.Interop.InfoPath.SemiTrust\11.0.0.0__71e9bce111e9429c
当然,如果你装的Office2007是中文版的那么会有相应的中文提示文件。(通常在“zh”或“zh-cn”文件夹下)


在SharePoint开发环境中配置CAML语法的智能感知

在我们进行SharePoint开发时,程序中常常会要求创建或修改某些XML文件,这些文件由CAML(Collaborative Application Markup Language)语法编写而成。本文将建议在您的开发环境Microsoft Visual Studio中引用一个名为WSS.XSD的XML架构文件,这样当我们操作基于CAML的文件时就能利用开发环境的智能感知功能来为我们的输入做出备选提示,加快代码工作了。

首先,新建一个文本文件,名为CAML.xml。输入如下代码:

 

<SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">
  
<Schema href="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\wss.xsd" 
          targetNamespace
="http://schemas.microsoft.com/sharepoint/"/>
</SchemaCatalog>

 

注意: 
schema元素的href属性指定的文件路径必须放在一行内。这里的折行是为了使文章内容更便于阅读。

CAML.xml文件将放在哪里?

接下来,将CAML.xml文件保存到C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\CAML.xml。
关闭并重启Visual Studio。这样,当我们编写CAML格式的文件并处于http://schemas.microsoft.com/sharepoint/命名空间下时,智能感知功能就可以使用了.
Visual Studio中有一个特殊的目录(C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\CAML.xml)专门用于管理不同目录结构下的XML架构,以此驱动智能感知功能的执行。在安装Visual Studio时会在此目录中增加一个名为catalog.xml的标准文件,该XML文件中包括了一些标准的XML架构的引用。这些架构驱动了默认的智能感知功能,并作为Visual Studio功能的一部份。这个机制被设计为可以方便的进行扩展。我们要做的只是创建一个扩展名为.xml的文件,来引用其他非标准的XML架构。然后将写好的文件拷贝到这个位置,并重新启动Visual Studio即可。Visual Studio会在启动时检查该目录下的所有XML文件,并确定出哪些XML架构可以被载入并用于驱动智能感知功能。

posted on 2007-08-22 12:05  windpole  阅读(335)  评论(0编辑  收藏  举报