0

我正在使用 Open XML SDK 2.0 Productivity Tool 来反映空的 PowerPoint 2010 演示文稿的代码。我将生成的代码复制到项目中的 .cs 文件中,该文件引用了 DocumentFormat.OpenXml.dll (v2.0.5022.0)。当我编译项目时,会出现一些错误:

Scene3D does not exist in the namespace 'DocumentFormat.OpenXml.Drawing'
TextAlignValues does not exist in the namespace 'DocumentFormat.OpenXml.Drawing'
TextAnchoringValues does not exist in the namespace 'DocumentFormat.OpenXml.Drawing'

尽管我刚刚从 Microsoft 站点下载了整个包,但生产力工具似乎正在生成引用不在 OpenXML 命名空间中的类型的代码:

http://www.microsoft.com/en-us/download/details.aspx?id=5124

另一方面,MSDN 文档指出 Scene3D 类属于不同的命名空间:DocumentFormat.OpenXml.Drawing.Diagrams 和 TextAlignValues 和 TextAnchoringValues 被 TextAlignTypeValues 和 TextAnchoringTypeValues 替换。

怎么了?是代码反射器生成错误代码还是我对 OpenXML dll 的引用不正确?我应该如何纠正这个?

4

0 回答 0