dotnet / dotnet/project-system

Building solution in VS 2017 fails with NETSDK1007 error

Open
#4,497 1 comment 0 reactions 0 assignees View on GitHub
Triage-Approved
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

I'm trying to build a solution that contains a .NET Core 2.1 unit test project and a few .NET Standard 2.0 project dependencies. I've attached the solution.

Building the solution through the command line using either "dotnet build NetSdk1007.sln" or "msbuild NetSdk1007.sln" is successful and I can run my tests in the command line and in Test Explorer. However, when I build the solution in Visual Studio, I get the error "NETSDK1007: Cannot find project info for 'C:\NetSdk1007\Dependency\Dependency.csproj'. This can indicate a missing project reference."

I have the command line workaround, but I'd like to be able to build this solution in Visual Studio and run the tests in Test Explorer.

_This issue has been moved from https://developercommunity.visualstudio.com/content/problem/376855/building-solution-in-vs-2017-fails-with-netsdk1007.html
VSTS ticketId: 724845_
_These are the original issue comments:_

Kevin Pilch [MSFT] on 11/7/2018, 08:59 AM (78 days ago):

Hi - do you have any projects unloaded, or any projects that have ProjectReference elements to projects that are not the .sln file? The in VS restore currently relies on the in memory project model, and fails in this way if a dependent project is unloaded or not present in the .sln file.


Allan Rodriguez on 11/7/2018, 10:10 AM (78 days ago):

Hello,

There are no unloaded projects or ProjectReferences to projects that are outside the solution. I made a test solution using only five projects to reproduce my problem and, aside from a couple NuGet package references, there are no references to outside projects.

Juan José Mejia [MSFT] on 1/10/2019, 07:47 AM (14 days ago):

We appreciate you taking the time to report this problem. We are currently prioritizing problems that are impacting a broad set of our customers, so we may not be able to investigate this one immediately. We know this problem is important to you, so we will continue to monitor it.

_These are the original issue solutions:_
(no solutions)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.