Could not get dependencies for project reference

46,625

Solution 1

Open the Website proj file in notepad and check the reference etc... can help

Solution 2

After trying many things, I realized something. The error was never going away, no matter what I did to clear the builds and such. I closed and reopened the solution and it went away.

Solution 3

When you get the error message "Could not get dependencies for project reference", one of the possible causes could be that you are referencing another project in your solution which has a Target framework not compatible with the target framework of the referencing project.

You can see the target framework specified for a project by going to the project properties and selecting the Application tab on the left.

I'm writing this because it happened to me, I was referencing a project with Target framework 4.0 from a project with target framework 3.5.

Solution 4

In my case the referenced project was created on VS 2010 while the referencee was a VS 2008 solution. In this case just edited the vs 2010 project with notepad, and changed the ToolsVersion="4.0" to ToolsVersion="3.5"

Solution 5

Look in your references. Make sure you have the correct path for the project reference for MyLibrary.

I would try to remove it and add it. Then instead of build I would choose Rebuild Solution, because rebuild deletes all .dll and rebuilds them.

Share:
46,625
simon831
Author by

simon831

C#, ASP.Net, TFS, LLBLGEN etc etc

Updated on July 09, 2022

Comments

  • simon831
    simon831 almost 2 years

    I have a C# solution with a website project and a C# library. When compiling the solution, the website gives the message:

    Could not get dependencies for project reference 'MyLibrary'.

    This does not stop the wbsite compiling and running until I try and build it with a TFS build, when this error message fails the build.

    What does this mean and how can I get round it?