Project 2013 开发人员文档Project 2013 developer documentation

查找文档、代码示例、操作方法文章和编程参考以帮助构建针对 Office 应用商店的应用程序或私有应用程序目录,以及自定义 Project Server 和 Project 客户端并将其与各种其他桌面应用程序和业务应用程序集成以进行企业项目管理。Find documentation, code samples, how-to articles, and programming references to help build apps for the Office Store or a private app catalog and to customize and integrate Project Server and the Project clients with a wide variety of other desktop and business applications for enterprise project management.

欢迎使用 Microsoft Project 2013 软件开发工具包 (SDK)。Welcome to the Microsoft Project 2013 Software Development Kit (SDK). SDK 中包含文档、代码示例、操作方法文章和编程参考以帮助构建针对公共应用商店的应用程序或私有应用程序目录,以及自定义 Project Server 和 Project 客户端并将其与各种其他桌面应用程序和业务应用程序集成以进行企业项目管理。The SDK contains documentation, code samples, how-to articles, and programming references to help build apps for a public store or private app catalog and to customize and integrate Project Server and the Project clients with a wide variety of other desktop and business applications for enterprise project management.

备注

Project Server 2013 基于 SharePoint Server 2013 平台,并且 Project 2013 中使用的大部分基础结构与其他 Office 2013 应用程序相同。Project Server 2013 is built on the SharePoint Server 2013 platform, and Project 2013 includes much of the same infrastructure as the other Office 2013 applications. 有关 SharePoint 加载项模型、基于 SharePoint 的工作流、Web 部件、其他 SharePoint 功能开发以及 Office 加载项的文档,请参阅 SharePoint 加载项Office 加载项For documentation of the model for SharePoint Add-ins, SharePoint-based workflows, Web Parts, development with other SharePoint features, and documentation of Office Add-ins, see SharePoint Add-ins and Office Add-ins.

Project SDK 简介Introduction to the Project SDK

Project Server 2013 是一个平台,用于构建本地或基于云的企业项目解决方案以及用于构建最终用户可以通过公共应用商店或私有应用程序目录发现和获取的应用程序。Project Server 2013 is a platform for building on-premises or cloud-based enterprise project management solutions and for building apps that end users can discover and acquire through a public store or a private app catalog. Project Server 2013 体系结构基于 Microsoft Office Project Server 2007 中引入的平台,具有许多新增功能和增强功能。The Project Server 2013 architecture is based on the platform introduced in Microsoft Office Project Server 2007, with many additions and improvements. 新增功能包括支持访问 Project Online 的客户端对象模型 (CSOM)、用于在线访问 Project Server 报告数据的 OData 服务、远程事件接收器、基于 Windows Workflow Foundation (WF4) 版本 4 和 Office 加载项的工作流体系结构,这款常用的体系结构适用于 Microsoft Office 2013 客户端应用程序中的任务窗格扩展。The new features include a client-side object model (CSOM) to enable access to Project Online, an OData service for online access to Project Server reporting data, remote event receivers, workflow architecture that is based on version 4 of the Windows Workflow Foundation (WF4), and Office Add-ins, which is a common architecture for task pane extensions in Microsoft Office 2013 client applications.

Project Server 2013 中的主要变化在于使用单个数据库代替 Project Server 2010 中的“草稿”、“已发布”、“存档”和“报告”数据库。A major change in Project Server 2013 is the use of a single database in place of the Draft, Published, Archive, and Reporting databases in Project Server 2010. 有关新增功能和弃用功能的详细信息,请参阅 Project 2013 中面向开发人员的更新For more information about new features and deprecated features, see Updates for developers in Project 2013. 有关 Project Server 平台中的变化的信息,请参阅 Project Server 2013 体系结构For information about changes in the Project Server platform, see Project Server 2013 architecture. 有关 Project Server 2010 中存在的基于 Project Server 2013 的开发平台概述,请参阅 MSDN 上的 Project 2010 开发入门For an overview of the development platform that exists in Project Server 2010 and that Project Server 2013 is based on, see Getting Started with Development for Project 2010 on MSDN.

Project Server 2013 基于 Microsoft .NET Framework 4 和 Microsoft SharePoint Server 2013。Project Server 2013 is built on the Microsoft .NET Framework 4 and Microsoft SharePoint Server 2013. 可以从此 SDK 中的文档和示例入手,开始开发自定义解决方案和应用程序;它们无法提供 Project Server 或 Project Professional 的可编程性功能。The articles and samples in this SDK provide a starting place for developing custom solutions and apps; they do not address all programmability features of Project Server or Project Professional. 可以通过 Project 开发人员中心的链接访问 Project 文章、博客、视频、广播、可视化操作方法文档和其他资源。The Project Developer Center includes links to Project articles, blogs, videos, webcasts, visual how-to articles, and other resources.

Project 2013 SDK 中包括 Project Server 2013、Project Web App、Project Professional 2013 和 Project Standard 2013 的开发人员信息。The Project 2013 SDK includes developer information for Project Server 2013, Project Web App, Project Professional 2013, and Project Standard 2013. SDK 文章旨在帮助开发人员和管理员评估 Project 和 Project Server,以便扩展和规划自定义解决方案。The SDK articles are designed to help developers and administrators evaluate Project and Project Server for extensibility and plan for custom solutions.

反馈Feedback

欢迎大家向我们提供反馈。We would like to hear from you. 在 MSDN 的联机主题上,你可以在每个页面底部的“社区内容”部分添加备注、代码示例或将内容标记为错误。In the online topics on MSDN, you can add comments, code samples, or flag the content as a bug in the Community Content section at the bottom of each page. 安装 Project 2013 SDK 下载时,每篇本地文档文章的标题下方均有一个“发送反馈”的链接。When you install the Project 2013 SDK download, the local documentation articles each have a Send Feedback link that is located below the title. 阅读 SDK 时,可随时选择该链接向 SDK 团队发送电子邮件。At any point in reading the SDK, choose the link to send an email to the SDK team. 可以发送校正、澄清或代码示例请求或者其他评论,帮助我们优化内容。You can send corrections, a request for clarification or a code sample, or other comments, and help us make the content stronger.

下载Download

可以在 Microsoft 下载中心 (https://www.microsoft.com/en-us/download/details.aspx?id=30435%20) 获取 Project 2013 SDK下载。The Project 2013 SDK download is available in the Microsoft Download Center ( https://www.microsoft.com/en-us/download/details.aspx?id=30435%20). 下载包括 Project2013SDK.HxS(包含此文章的文件)、相关代码示例、可再发行程序集和其他资源。The download includes Project2013SDK.HxS (the file that includes this article), related code samples, redistributable assemblies, and other resources. 但是,Project 2013 SDK 中不包括报告数据表引用。The Project 2013 SDK does not yet include the Reporting datatables reference.

Project SDK 中的新增功能What's new in the Project SDK

Project 2013 SDK 的主要目的在于提供 CSOM 和相关功能的可编程性和文档概述,以便创建应用程序、Project Server Interface (PSI) 接口服务和适用于 Project Professional 2013 的任务窗格应用程序。The main purpose of the Project 2013 SDK is to provide an overview of programmability and documentation of the CSOM and related features for creating apps, the Project Server Interface (PSI) services, and task pane apps for Project Professional 2013. Project 2013 SDK 中包含自定义 Project Server 2013 和 Project 客户端(Project Standard 2013、Project Professional 2013 和 Project Web App)的关键部分的分步示例。The Project 2013 SDK includes step-by-step examples of key areas for customization of Project Server 2013 and the Project clients (Project Standard 2013, Project Professional 2013, and Project Web App). 文档目前上不完整;在以后的版本中将会添加更多内容。The documentation is incomplete; more content will be added in later releases.

网络通信的基础技术是 Project Server 2013 中的 Windows Communication Foundation (WCF),包括使用 Project Server CSOM 的云方案和使用 PSI 的本地开发。The underlying technology for network communication is Windows Communication Foundation (WCF) in Project Server 2013, including cloud scenarios that use the Project Server CSOM and on-premises development using the PSI. 旧版 ASMX Web 服务引用也是基于 WCF 体系结构。The legacy ASMX web service references are also based on the WCF architecture. 在 Project Server 2013 中设置 PSI Web 服务引用(ASMX 文件)需要在路径中附加 ?wsdl URL 选项。Setting a reference to a PSI web service (ASMX file) in Project Server 2013 requires appending the ?wsdl URL option to the path. 例如,https://ServerName/ProjectServerName/_vti_bin/PSI/Resource.asmx?wsdlFor example, https://ServerName/ProjectServerName/_vti_bin/PSI/Resource.asmx?wsdl.

备注

尽管它仅提供了最常用的 Project Server 功能,但对于本地和云中的应用程序,我们建议你尽可能使用 CSOM。Although it addresses only the most commonly used Project Server features, we recommend that you use the CSOM where possible for applications both on-premises and in the cloud. 适用于 PSI 的 ASMX 接口已弃用,但 Project Server 2013 中仍提供了此接口。Although it is still available in Project Server 2013, the ASMX interface for the PSI is deprecated. 对于需要完全访问 PSI 的本地应用程序,应使用适用于 PSI 的 WCF 接口,而不是 ASMX 接口。For on-premises applications that require full access to the PSI, you should use the WCF interface for the PSI, rather than the ASMX interface.

通过将适用于 Project Server 2013 和 SharePoint Server 2013 的 CSOM 程序集复制到开发计算机来支持在 Windows 7 计算机上进行开发。Development on a Windows 7 computer is supported by copying the CSOM assemblies for Project Server 2013 and for SharePoint Server 2013 to the development computer. SDK 下载中包括适用于 Project Server 的程序集和可再发行的许可证。The SDK download includes the CSOM assemblies for Project Server and a redistribution license. 若要获取 SharePoint CSOM 程序集,请参阅 SharePoint Server 2013 客户端组件 SDK.To get the SharePoint CSOM assemblies, see SharePoint Server 2013 Client Components SDK.

对于使用 WCF 服务进行的开发,您可以设置对 PSI 代理程序集的引用或向解决方案添加 PSI 代理文件。可以设置对来自同一域中远程计算机的前端 Project Server ASMX Web 服务的直接引用,也可以使用代理程序集或代理文件。SDK 下载包括 WCF 服务和 ASMX Web 服务的代理文件,以及用于构建代理程序集和生成更新的代理文件的脚本。For development with the WCF services, you can set a reference to a PSI proxy assembly or add PSI proxy files to the solution. You can set direct references to the front-end Project Server ASMX web services from a remote computer within the same domain, or use a proxy assembly or proxy files. The SDK download includes proxy files for the WCF services and the ASMX web services, plus scripts for building the proxy assemblies and for generating updated proxy files.

在 Project Server 2013 中,可使用适合于本地和联机使用的 Microsoft SharePoint Designer 2013 创建声明性 Project Server。In Project Server 2013, you can create declarative Project Server workflows by using Microsoft SharePoint Designer 2013, for both on-premises and online use. SharePoint Designer 2013 使用 CSOM 中的工作流活动属性和方法。SharePoint Designer 2013 uses the workflow activity properties and methods in the CSOM. 仅在 Project Server 计算机上支持开发和部署包含 Project Server Web 部件或 Project Web App 自定义项的 Visual Studio 2012 解决方案。Development and deployment of Visual Studio 2012 solutions that include Project Server Web Parts, or customizations of Project Web App, is supported only on a Project Server computer.

有关 Project Server 2013 中的新增可编程性功能和弃用功能的概述,请参阅 Project 2013 中面向开发人员的更新For an overview of new programmability features and deprecated features in Project Server 2013, see Updates for developers in Project 2013. Project Server 2013 中的另一个主要变化是使用基于 WF4 的工作流来管理基于企业项目版本的项目方案的创建和审批。Another major change in Project Server 2013 is the use of WF4-based workflows to manage the creation and approval of project proposals that are based on enterprise project templates.

新主题包括以下内容:New topics include the following:

只有少量文档主题涉及 PSI 服务中的 Microsoft.ProjectServer.Client 命名空间和新方法。Topics in the Microsoft.ProjectServer.Client namespace and new methods in the PSI services have only minimal documentation. 大多数 PSI 服务参考主题与 2011 年 7 月发行的 Project 2010 SDK 保持相同。Most of the reference topics for the PSI services are unchanged from the July 2011 release of the Project 2010 SDK.

未来的 SDK 版本Future SDK releases

Project 2013 SDK 将随公开发行版的新文章和参考内容一起更新。The Project 2013 SDK will be updated with new articles and reference content for the general availability release.

Project SDK 中的章节Sections in the Project SDK

Project 2013 SDK 中具有两个顶级章节:There are two top-level sections in the Project 2013 SDK:

概念和操作方法文档一节包括以下小节:The Conceptual and how-to articles section includes the following:

  • 面向开发人员的新增功能和已弃用功能介绍了 Project 2013 中主要的新可编程性功能和已弃用功能。What's new and what's out for developers describes the major new programmability features and deprecated features in Project 2013.

  • 面向开发人员的 Project 概述包括有关 Project Server 体系结构的文章、说明如何开始使用 CSOM 进行开发的文章、有关 VBA for Project 中的新增功能的信息,以及对 Office 2013 SDK 的参考(其中包含有关为 Project Professional 2013 开发任务窗格应用程序的主题)。Project overview for developers includes articles about Project Server architecture, articles that show how to get started developing with the CSOM, information about new features in VBA for Project, and a reference to the Office 2013 SDK, which contains topics about developing task pane apps for Project Professional 2013.

  • Project 编程任务包括有关创建适用于 Project Server 的应用程序、使用 JavaScript 和 CSOM 以及创建适用于需求管理的项目方案和工作流的操作方法文章。Project programming tasks includes how-to articles about creating apps for Project Server, using JavaScript with the CSOM, and creating project proposals and workflows for demand management.

  • Project 2013 编程参考介绍了 Project Server 2013 的 PSI 参考、有关 Project Server 错误代码的信息以及 ProjectData 服务的 OData 架构参考。Project 2013 programming references includes an introduction to the PSI reference for Project Server 2013, information about Project Server error codes, and the OData schema reference for the ProjectData service.

备注

以下是开发和部署与 Project Server 2013 集成的公共 Office 应用商店中的 EPM 解决方案和应用程序的要求:> 必须在开发计算机和部署计算机上安装 .NET Framework 4 或 .NET Framework 4.5。Following are requirements to develop and deploy EPM solutions and apps from the public Office Store that integrate with Project Server 2013: > You must install either the .NET Framework 4 or the .NET Framework 4.5 on the development computer and on the deployment computers. 若要确定是否安装了正确的版本,请在 Windows 控制面板中打开“程序和功能”。To determine whether the correct release is installed, open Programs and Features in the Windows Control Panel. > Visual Studio 2012 安装和使用 .NET Framework 4.5。> Visual Studio 2012 installs and uses the .NET Framework 4.5. 创建 Visual Studio 项目时,可以在”新建项目”对话框的下拉列表中选择 .NET Framework 4.0NET Framework 4.5When you create a Visual Studio project, you can select either .NET Framework 4.0 or NET Framework 4.5 in the drop-down list of the New Project dialog box. 也可以在项目“属性”窗口的“应用程序”选项卡上选择“目标框架”。You can also select the Target Framework on the Application tab of the project Properties window. > 对于使用 CSOM 或 PSI 的应用程序以及 Project 任务窗格应用程序,可以使用 Visual Studio 2010。> You can use Visual Studio 2010 for applications that use the CSOM or the PSI, and for Project task pane apps. 但是,Visual Studio 2010 不包含 Office 加载项模板、Office 开发工具或适用于 Office 2013 的 SharePoint 开发工具。However, Visual Studio 2010 does not contain the Office Add-ins templates, Office development tools, or SharePoint development tools for Office 2013. 若要下载 Visual Studio 2012 以及包含 Office 和 SharePoint 开发工具的 Web 平台安装程序 (WebPI),请参阅 Office 和 SharePoint 应用程序下载To download Visual Studio 2012 and the Web Platform Installer (WebPI) that includes the Office and SharePoint development tools, see Downloads for Apps for Office and SharePoint. > 建议你在测试环境中开发自定义解决方案。> We recommend that you develop custom solutions in a test environment. 如果在当前版本的 Project Server 2013 和 Project 2013 中开发解决方案,则会使用更新后的参考重新编译这些解决方案,这可能需要进行额外的更改才适用于后续版本。If you develop solutions for the current builds of Project Server 2013 and Project 2013, they should be recompiled with updated references, and may need additional changes, to work with later releases. 针对任何预发行版本开发的解决方案可能不适用于公开发行的版本。Solutions developed for any pre-release version may not work with the released version.

另请参阅See also