Visual Studio database project fails to publish, no error messages

Edit: The old answer below worked for me once but was intermittent on subsequent occasions. I then noticed that I was actually getting an error displayed in the bottom left hand corner of Visual Studio:

Exception from HRESULT: 0x80041FE2 The tab has been closed.

Searching on the above returned this article: https://connect.microsoft.com/VisualStudio/feedback/details/827417/vs-express-2013-cannot-reopen-any-open-file-tabs-and-silently-closes-them-on-selection

So I closed all my open tabs and was then able to publish.

Old answer: To resolve this issue after clicking Publish, instead of clicking Load Profile I clicked Edit and browsed to the database server. I then clicked Test connection. The test connection came back successful. I then clicked Load Values for my SQLCMD variables. On clicking Publish, the database project published successfully.

After following the above steps, I was then able to publish again by my usual method of clicking Load Profile on the Publish Database dialog.


I have a Visual Studio 2015 solution with database and SSIS projects. At some point publishing the database project stopped working as described above.

I closed all open tabs in the solution, and then was able to publish the database successfully.