New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VS 2017 RC error: Cannot find project info for... This can indicate a missing project reference #7425
Comments
same issue here with a .net standard class library |
I have the same problem, anyway can solve it? |
Also hitting this in my ASP.NET Core samples, unsure of the cause yet. |
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 |
same issue here. |
Same issue - Is this behaviour intentional? |
@dsplaisted I believe this is fixed in most recent SDK. Can you confirm? |
@piotrpMSFT I couldn't reproduce this behaviour with one of the latest builds: λ dotnet --info Product Information: Runtime Environment: |
The problem still occurs today using VS2017 RC 26020. |
@mgwalm I don't think this is a problem with the latest sdk rc4 but with the visual studio plugin - I have been finding a lot of differences between building from command line using dotnet build and building through visual studio 2017 rc. I believe the plugin is not up to date or VS is doing something "smart". |
Do MS know this? |
@mgwalm can you install the latest VS RC? as @BizzyIzDizzy pointed out, this is not repro'ing in recent CLI builds, including the RC3 build that went out in the latest Visual Studio RC. If you see this atop the latest VS, please let us know! |
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 :( |
@piotrpMSFT i have the same problem in MacOS (Visual Studio for Mac Preview - Version Preview 3 (7.0 build 1077) .NET Command Line Tools (1.0.0-rc3-004530) |
@bkapo that's a fairly old CLI build. Can you install RC4 from the home page of this repo and, if you're still seeing an issue, can you open a new one? If there is a problem in VS for Mac then the investigation will be fairly independent of this issue. |
Ive got RC.3+26127.3 and the problem seems to have been resolved. |
Thanks @mgwalm. That's what I see as well. |
I have the same problem with RC4. .NET Command Line Tools (1.0.0-rc4-004767) |
|
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'm on Windows 10. VS 26206.0. I'm getting this from the command line too. I had some success deleting |
Same issue here with
|
This issue is marked closed but I'm seeing it with the released VS 2017, how do I fix it? |
Also had this in a TFS build using Visual Studio solution task set to use VS2017 RTM. Making the transitive project references direct solved it, but seems suboptimal. |
Seeing this problem with released VS 2017 as well. |
Can you share a repro of this issue? Does restoring/building through the command line work? |
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. |
Please, file an issue for the better error message at dotnet/sdk repo. |
I just got this today, is it moved to another issue or? |
Just had this issue as well. No |
I've fixed this problem just setting the project with this issue to the same target framework that the refference project. My main project was on the framework 4.5.2 and the refference project was on 4.6.2. To change the framework of your project just go to: right click on your project >> properties >> Application >> Target Framework |
@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. |
I had this problem. Command: donet restore fixed this. |
I had the same error. It was caused by an invalid hint path that VS added with one of the quick actions. Delete the hint path and all good again |
|
Like @flipchart said, If you guys changed the dependencies' target standard, like from netstandard1.5 to netstandard1.0, you will have to remove the hintpath in the target project's .csproj. For example |
@HelloKitty : The case I found had zilch-all to do with HintPath; there was no HintPath in the .csproj file. |
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 Doing a manual |
@HelloKitty Thanks for the help. I did switch my .NET Core version, and had endless frustration until I read your comment. |
I am seeing same error in VSTS builds, works fine in vs2017 15.2 (26430.16). Even if I build the code retrieved directly by the build agent in VS it works fine. Extract from build log below:
This error occurs on both our local build agent and the VSTS Hosted2017 agent. Further investigation tells me this comes from the ASP.NET Core web application project. When this project was not part of the solution the other projects worked. These include .NetStandard 1.6 and .NetCore 1.1 and xUnit test projects. I have included the csproj file for the web project:
Not sure if it has anything to do with the Telerik package which needs a service endpoint created. |
This answer on StackOverflow got me to just update all my projects from .net 4.5.2 to .net 4.6.1 and now this error is gone. Hope this info helps somebody. |
This appears to be a "generic error" that they spit out. It turned out to be an error in the default values the msbuild task added in the build definition. I changed the MSBuild Arguments to this:
and all was good again. I don't think adding a new target framework is a good idea in many circumstances. Your applications should be targeting specific frameworks for a reason I assume. |
On a similar problem with my machine, I had to reset the below file which was accidentally modified when I was trying to make my assemblies to be on net45 and core api targetting to net45. After that it was not building my solution and started to throw different errors, even after I reverted back everything to target with .net core. Tried deleting VS related cache/settings folders of my local user login, no result, then I was about to uninstall VS2017, before that found the below file had a modified timestamp and somehow got its original content. Now its fine to build and run my original solution which is targetting to .net core. C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets |
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 |
I had to delete the Get-ChildItem . -Recurse -Force | where { $_.Name -match ".*FileListAbsolute.txt" } | Remove-Item
Get-ChildItem . -Recurse -Force | where { $_.Name -match ".*nuget.g.targets" } | Remove-Item |
I restarted VS and it worked fine. |
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. |
Thank you @WolfyUK ! Same scenario for me, and your tip resolved my similar issue. Cheers! |
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 in *.csproj files and for any project path reference in the sln file. |
I have unloaded the project and reloaded the project it work from me. |
Deleting |
|
This is Not Correct Behavior , so what if then Project C reference project D and Project D Reference Project E and .... |
So my problem was the following: I had a project A that I've tried to add to a Project B. The problem was that everytime I added the reference I blow up the solution just like you say in the title. After banging a lot with my head I found out that the assembly name of the project A had the name of a project C which was already referenced in project B. So everytime I tried to add the reference and build, basically he wouldn't find the project a reference because it already existed associated with other reference. So basically, I changed the name of the assembly name of the project A to the name of the project A. |
Steps to reproduce
add project reference "Library 1" to "Library 2"
add project reference "Library 2" to ASP.Core
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:
WebApplication2.zip
The text was updated successfully, but these errors were encountered: