Microsoft.ProjectServer.Client dll丢失

时间:2018-06-19 10:19:06

标签: c# sharepoint sharepoint-2010 sharepoint-2013

我正在尝试在SharePoint中生成查找表并从示例项目中获取参考。以下是我所指的代码段:

using Microsoft.SharePoint.Client; 
using Microsoft.ProjectServer.Client;   
using System.Security;
using System.Configuration;

namespace PWA_CSOM
{
    public partial class FinalLogic_Second : System.Windows.Forms.Form
    {
        #region veriables
        private static ProjectContext projContext;
        string pwaPath = "";
        string userId = "";
        string userPassword = "";
    }
}

我创建了一个新项目,并创建了一个变量来输入ProjectContext,但是我无法找到它的参考。我到处尝试但没有运气:

using Microsoft.ProjectServer.Client;   //Missing Reference

namespace LookupTable
{
    public static class Infrastructure
    {
        #region Properties
        public ProjectContext project;
        #endregion
    }
}

我试过Local Assembly Reference但没有运气 - Local Reference

还尝试了Nuget参考 - enter image description here

我的遗体是否遗漏了什么?任何帮助表示赞赏。

2 个答案:

答案 0 :(得分:2)

在Visual Studio的程序包管理器控制台中安装SharePoint Online CSOM程序包。

Install-Package Microsoft.SharePointOnline.CSOM -Version 16.1.7723.1200

https://www.nuget.org/packages/Microsoft.SharePointOnline.CSOM

enter image description here

答案 1 :(得分:0)

If you have already installed Project Server you can do this.

As mentioned Here , You can reference to this library again by just going into this path and select the dll file.

%ProgramFiles%\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.ProjectServer.Client.dll