A: 

Have you tried regenerating the database project from a database that's currently up to date? We haven't had this problem, but if the project contains only objects that deploy to the database itself, you should be able to re-create it from the database the other direction.

I know that's not ideal, but I'm not sure what could fall out of sync or disappear from your project that would cause this error.

rwmnau
We have tried that, same problem.
The Matt
A: 

Is your SQL Service running?? This looks like an error I get when my service dies.

Jesse Seger
Yes, it's running.
The Matt
A: 

When you deploy the database project, it generates a SQL script file (the name of this file is given in the output window).

If you open that file, you should actually be able to comment out blocks of code until you figure out what is going wrong.

One thing that I found out the hard way is that the Post-Deployment.SQL file runs under SQLCMD mode and it does not append a blank line to the end of each file that you call with syntax -

:r 'Filename.sql'

so you must physically add blank lines to all your .SQL files - I even did it to the ones that create tables, indices, constraints, etc.

Raj More
+1  A: 

After much back and forth troubleshooting with Microsoft Premiere support, we've been informed that we've found a bug in the database edition of Visual Studio. We gave up before it was resolved and ended up scrapping using the part of the database project in our solution.

The official workaround from Microsoft is to deploy the database project using an account which is able to see the account which granted the deploying account the VIEW DEFINITION permission.

The Matt