Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find file dacpac?

Tags:

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?

like image 747
ScubaSteve Avatar asked Jun 26 '14 15:06

ScubaSteve


People also ask

How do I extract a Dacpac file?

Right-click the DAC package (. dacpac) file and select Unpack.

What is the Dacpac file?

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.

How do you test for Dacpac?

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.


1 Answers

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.

like image 140
ScubaSteve Avatar answered Sep 22 '22 14:09

ScubaSteve