找不到文件或程序集System.Web.Services



我试图使用c#执行下面的代码从Sharepoint检索细节。给出错误:

先。FileNotFoundException: '无法加载文件或程序集包含。服务,版本=4.0.0.0,文化=中性,都必须b03f5f7f11d50a3a"。系统找不到文件指定。">

using (ClientContext spcontext = new ClientContext("siteURL"))
{
spcontext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
spcontext.FormsAuthenticationLoginInfo = new FormsAuthenticationLoginInfo("UserName","Password");
spcontext.Load(spcontext.Web, w => w.Title, w => w.ServerRelativeUrl, w => w.Lists);
spcontext.ExecuteQuery();
Console.WriteLine(spcontext.Web.ServerRelativeUrl);
}

我的应用是ASP。. NET Core 3.1.

System.Web。. net Core中不存在服务

最新更新