How to add `System.Web.Extensions` assembly to .net core project in vscode

后端 未结 3 1812
面向向阳花
面向向阳花 2020-12-18 20:07

I have installed c# support for vscode(version is 1.15.0) and created a HelloWorld project via dotnet new console.

Now in Program.cs

3条回答
  •  眼角桃花
    2020-12-18 21:07

    System.Web.Extensions is part of full .net framework . If you want to serialize and deserialize object,You can use Newtonsoft.Json,

    #using Newtonsoft.Json
    ....
    JsonConvert.DeserializeObject(json);
    

    Update

    Just get package name and version number from NuGet and add to .csproj then save. You will be prompted to run restore that will import new packages.

    
         
      
    

提交回复
热议问题