Could not get dependencies for project reference

折月煮酒 提交于 2019-12-04 22:17:57

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

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.

Apperside

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.

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"

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.

If by "TFS build" you mean you are using a separate build server then you could try checking the build configuration that the build server is using.

For example, when you build on your local machine you may be targeting the debug configuration while the build server is using the release configuration.

In each build configuration you could ensure that the project "MyLibrary" is selected to build.

This is an official bug in the VS SDK:

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=276380

I opend this one, and I could read the following there: Von Microsoft am09.05.2007 um 19:05 bereitgestellt

Thanks for your feedback. We have reproduced this bug on Visual Studio 2005 SP1, and we are sending this bug to the appropriate group within the VisualStudio Product Team for triage and resolution.

Thank you, Visual Studio Product Team.

I think this bug still exists for web site projects and yes; we use VS 20102 Ultimate. I have an application in \APP_CODE under my Virtual Directory and I have 2 DLL of which the source code is C#, and I have 3 DLL?s of which the source code is Oxygene, OXygene (PASCAL) from RemObjects. I see this reference only with the DLL's written in PASCAL; but when I test this 3 DLL's from a test application all is fine and my test application has absolute no problem to reference any classes or vars inside this 3 DLL's. So what could be the difference in compilation/build ledaing to the following error string in the VS output window. An erro which as described many times, never goes away.

Could not get dependencies for project reference 'Toolbox'Could not get dependencies for project reference 'IMPLEM'Could not get dependencies for project reference 'LEGACY'Validating Web Site

If you get this problem all the time even after cleaning and rebuilding the solution, then it means there is something wrong with any of the referenced projects. Check the Output window for any warnings during the compilation process. Remedy the warning and it could help you compile with success.

"Clean Solution" cant help, sometimes you need to remove DLL manually from website project (Bin folder). Remove DLL and build the Solution again.

In my case I had dropped .NET 4.6 updated assemblies on the solution and one of the projects happened to be set to .NET 4.5, either downgrading the assemblies or upgrading the project to 4.6 fixed it.

sylvia

Try to check on the configuration for the project. I've noticed that changing it to 'any CPU' works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!