I am using Microsoft Visual Studio Community 2019 Preview - Version 16.8.0 Preview 2.0 , .NET Core 5.0.100-preview.8.20417.9
, ASP.NET Core 5.0-preview Web API.Original file *.csproj
<Project Sdk="Microsoft.NET.Sdk.Web"><PropertyGroup><TargetFramework>net5.0</TargetFramework></PropertyGroup></Project>
Then I add (copy a part from another projects manually)
<Project Sdk="Microsoft.NET.Sdk.Web"><PropertyGroup><TargetFramework>net5.0</TargetFramework></PropertyGroup><ItemGroup><PackageReference Include="AWSSDK.Polly" Version="3.5.0.5" /><PackageReference Include="ChilkatNativeLib" Version="9.5.0.83" /><PackageReference Include="HtmlAgilityPack" Version="1.11.24" /><PackageReference Include="HtmlAgilityPack.NetCore" Version="1.5.0.1" /><PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0-preview.8.20414.8" /><PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" /><PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.0-preview.8.20414.8" /><PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.0-preview.8.20414.8" /><PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0-preview.8.20407.4" /><PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-preview.8.20407.4" /><PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-preview.8.20407.4"><PrivateAssets>all</PrivateAssets><IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets></PackageReference><PackageReference Include="Microsoft.Extensions.Identity.Core" Version="5.0.0-preview.8.20414.8" /><PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.0-preview.8.20419.1" /><PackageReference Include="MimeKit" Version="2.9.1" /><PackageReference Include="NAudio" Version="1.10.0" /><PackageReference Include="Newtonsoft.Json" Version="12.0.3" /><PackageReference Include="NUnit" Version="3.12.0" /><PackageReference Include="RestSharp" Version="106.11.5-alpha.0.18" /><PackageReference Include="SendGrid" Version="9.21.0" /><PackageReference Include="Serilog" Version="2.10.0-dev-01240" /><PackageReference Include="Swashbuckle.AspNetCore" Version="5.5.1" /><PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="5.5.1" /><PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="5.5.1" /><PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="5.5.1" /><PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.5.1" /><PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" /><PackageReference Include="System.ServiceModel.Syndication" Version="5.0.0-preview.8.20407.11" /><PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0-preview.8.20407.11" /></ItemGroup></Project>
Then I run
dotnet restore
but not success.
How to restore or install Nuget packages from copy then paste to *.csproj
file?