.net core add Web Reference

Lukino Grdzelishvili picture Lukino Grdzelishvili · Aug 11, 2017 · Viewed 7.6k times · Source

I have two Web Project.

First was created about 2-3 weeks ago and Second today.

I want to add Web Reference to the second web project.

First old Project Solution View

First old Project Solution View

Second new Project Solution View

enter image description here

In new Project I can't find how to add Web Reference. I can add Service Reference but I don't need it.

From here I can add Service Reference

enter image description here

but I can't add Web Reference Like it was in old project

enter image description here

From where I should add Web Reference? Is there any changes regarding web references?

Answer

gsvolt picture gsvolt · Oct 30, 2019

Here's what I would try in a command line:

  • cd "Full path to folder where ConsoleApp1 project lives"
  • dotnet add package "Full path to Test projects .csproj file"

This command should edit your ConsoleApp1.csproj file. Then you can try to build it with:

  • dotnet build