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?
Right-click the DAC package (. dacpac) file and select Unpack.
What is a DACPAC? A DACPAC is a data-tier application package in the form of a windows file containing all the database structure into one unit.
In Solution Explorer, right click the project node and select Properties.... On the Project Settings tab, in the Output Types section, select the Data-tier Application (. dacpac File) check box, and then close the properties dialog.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With