有人知道如何通过 C# 为 Project Server 2003 创建项目/任务吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18705/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Anyone know how to create Projects/Tasks for Project Server 2003 via C#?
提问by SkullDuggerT
I need to be able to create basic MS Project items (tasks, projects, resources, etc.) programmatically from my app to my Project Server 2003 install, and haven't found any good examples. Can anyone point me to some good references or have some sample code of connecting to the server and creating these items?
我需要能够从我的应用程序到我的 Project Server 2003 安装以编程方式创建基本的 MS Project 项目(任务、项目、资源等),但没有找到任何好的示例。任何人都可以给我一些好的参考资料,或者有一些连接到服务器并创建这些项目的示例代码吗?
采纳答案by SkullDuggerT
Developing against Project Server 2003 isn't the friendliest experience around, but I have worked a little bit with the PDS (Project Data Services) which is SOAP based
针对 Project Server 2003 进行开发并不是最友好的体验,但我已经使用基于 SOAP 的 PDS(项目数据服务)进行了一些工作
http://msdn.microsoft.com/en-us/library/aa204408(office.11).aspx
http://msdn.microsoft.com/en-us/library/aa204408(office.11).aspx
It contains .NET samples there
它在那里包含 .NET 示例
回答by SkullDuggerT
As far as I know, the only programatic access to PS 2003 is through PWS.
据我所知,对 PS 2003 的唯一编程访问是通过 PWS。
I don't know if it would work, but you could try writing a managed extension for Microsoft Project 2003 (The client application) .There is a managed API for MS Project 2003, and you might be able to leverage that to communicate with the server, get a project and update it all in code.
我不知道它是否可行,但您可以尝试为 Microsoft Project 2003(客户端应用程序)编写一个托管扩展。MS Project 2003 有一个托管 API,您可以利用它与服务器,获取一个项目并在代码中更新它。
Good luck!
祝你好运!