dotnet cli <> VS2017 nuget packages restore errors

612 views Asked by At

I've used dotnet cli (2.0.0) to create 2 projects:

  1. dotnet new webapi (name: webapiProject)
  2. dotnet new xunit (name: testProject)

after that, on testProject project: dotnet add reference webapiProject

test project is an integration test and it uses webapiProjects Startup. when i do dotnet run on xunit one, all works fine. tests run, references work, all good.

But, when i load testProject.csproj in VS2017 (15.3.3), i get nuget NU1105 error:

Severity Code Description Project File Line Suppression State Error NU1105 Unable to find project information for 'webapiProject'. The project file may be invalid or missing targets required for restore.

I am actually rather new to dotnet cli and i am not even sure i should be loading *.csproj in VS2017 but i did so because when i opened only my test class then i didn't have intellisense for it.

So, any advice would be highly appreciated about both:

  1. the error
  2. correct workflow
0

There are 0 answers