sdk: VS 2017 RC error: Cannot find project info for... This can indicate a missing project reference
Steps to reproduce
- Create ASP.Core project (.NET Framework), then update to latest Nuget packages;
- Create Class Library 1 (.NET Framework), add Microsoft.EntityFrameworkCore.SqlServer nuget package
- Create Class Library 2 (.NET Framework), add Microsoft.EntityFrameworkCore.Relational nuget package
- Compile to test: solution should be possible to compile
- Create References: add project reference “Library 1” to “Library 2” add project reference “Library 2” to ASP.Core
- Compile
Expected behavior
Compiled solution. Or compilation error message that contains useful information.
Actual behavior
Compilation error

Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-preview4-004233)
Product Information: Version: 1.0.0-preview4-004233 Commit SHA-1 hash: 8cec61c6f7
Runtime Environment: OS Name: Windows OS Version: 10.0.14393 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\1.0.0-preview4-004233
Solution:
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 11
- Comments: 54 (9 by maintainers)
Okay so the issue is that transitive dependencies do not work. If Project A references Project B, then Project A must (at the moment) directly reference the projects referenced in Project B.
For example: if
AreferencesBandBreferencesC, to get rid of this errorAmust referenceBandCdirectly.This issue is marked closed but I’m seeing it with the released VS 2017, how do I fix it? I tried adding all the references to my .NET Core project still no luck
I restarted VS and it worked fine.
Seeing this problem with released VS 2017 as well.
For me, this was a case sensitivity issue. The folder containing the dependent project had been renamed and the consuming project file updated, but the solution file had not. Making sure all paths match correctly in
.sln,.csprojand physically on disk resolved theCannot find project infoissue.I am hitting this with a directly referenced project and no HintPath. I am running VS 2017 (15.2)
Project A is for netstandard1.0 Project B is for netstandard2.0 and net45 Project B references project A
Doing a manual
dotnet restoreseems to fix it.I had this problem. Command: donet restore fixed this.
@Slaters I got the issue with no such mismatch, .net core not 4.x versions. either error message is misleading or it’s something else. surprised this shipped with vs 2017… impossible to do serious work when you spend 90% of your project trying to figure out these vague errors for common project setups.
Same here on a mac (though probably not really related to the os).
How i fixed it was to delete all the obj and bin folders manually and restore the packages with CLI.(restore failed in VS for mac, “object not set to an instance…” but command line was fine). Then rebuilt and it worked. this is on the latest .net core tools, standard library etc… on a multi-project solution.
I have the same problem with RC4. I am using VS for Mac …
.NET Command Line Tools (1.0.0-rc4-004767) Product Information: Version: 1.0.0-rc4-004767 Commit SHA-1 hash: f7978d90e6 Runtime Environment: OS Name: Mac OS X OS Version: 10.12 OS Platform: Darwin RID: osx.10.12-x64 Base Path: /usr/local/share/dotnet/sdk/1.0.0-rc4-004767
I have the same problem, but in MacOS with VS for Mac, open solution in VS 2017 in Windows is okay. So boring, I dreamed about one day I can code dotnetcore in my Mac 😦
dotnet restoreworks for me. oops…I can confirm that it seems to be the casing of the path that needs to be exactly as it is in the filesystem. This goes for the Include in <ProjectReference Include=""/> in *.csproj files and for any project path reference in the sln file. Might be a good idea to implement a proper comparer for comparing the path, and not rely on casing.
Deleting
objandbinand restoring worked for me as per @clearbucketLabs.Open /obj/project.assets and remove the project from the targets. Worked for me. For some reason the project.assets contains even the referenced projects from excluded files.
Please, file an issue for the better error message at dotnet/sdk repo.
Found out what I was doing wrong. I was thrown off by the error message…
My problem was that I was targeting net452 in the class library I was referencing in a asp.net core app targeting netcoreapp1.1. I’d expect a ‘mismatch’ error instead.
@dsplaisted I believe this is fixed in most recent SDK. Can you confirm?