Reputation: 8270
When I try to publish a database project, while Creating Publish Preview..., I get this error: Could not find file 'C:...[DatabaseProjName]\sql\debug[DatabaseProjName].dacpac'. How do I get this file?
Upvotes: 24
Views: 10329
Reputation: 1229
Ensure that your installed version of SQL where are you trying to deploy is the same than the project properties.
Upvotes: 2
Reputation: 8270
I was getting this error over and over and could not figure out why. I would get the latest, overwrite existing files, checked all of my publish connection info, checked the database project properties, still got the error.
The cause, maybe due to a bug, I don't know, but neither building my solution nor publishing the database project was actually building the database project.
The solution is simple, just right-click on the database project and Rebuild. This will create the dacpac file and allow you to publish.
Upvotes: 61