I recently came across this error in one of my projects, whenver I build my setup project it used to throw this error.
“Unable to update the dependencies of the project”
The rest of the project in the solution worked fine, only this setup project kept throwing this error.
After a bit of searching here and there I came across many wierd solutions.
Of which only one worked for me …
Simply close the solution and Open it again !
It was this simple for me, hope it works for you too.