ProjectServerManager.GetProjectRawData

ProjectServerManager.GetProjectRawData method

获取项目的二进制数据以进行故障排除。

public Stream GetProjectRawData(Guid projectGuid)
范围类型描述
projectGuidGuid要读取的项目的 Guid。

返回值

包含原始项目数据的流。

例子

In this example the debug info for the specific project is retrieved. You can pass the resulting "debug.zip" to the support team for troubleshooting purposes.
[C#]
var credentials = new ProjectServerCredentials("https://xxxxxx.sharepoint.com", "yyyyy@xxxxxxx.onmicrosoft.com", "密码");
// 你试图获取的项目的 Guid。
var projectGuid = new Guid("e0294bfb-5657-45c8-9cc5-82169fb95d69");
ProjectServerManager manager = new ProjectServerManager(credentials);
using (var fileStream = File.OpenWrite(@"c:\debug.zip"))
{
    using (var stream = manager.GetProjectRawData(projectGuid))
    {
        stream.CopyTo(fileStream);
    }
}

也可以看看