Search code examples
sql-servergitvisual-studio-2015azure-devopsdacpac

Importing DACPAC appended "_2" to all objects


I'm new to using DACPACs and Git and I've run into what is probably a simple issue but I'm not sure how to get around it.

We're using Git on Visual Studio Team Services (was VSO) to manage a project. I tried to add a new database project to our solution, import a DACPAC and push it to the Team Services repository. The first time I did this, some incoming pull requests got in the way and I had to revert all my changes, sync the requests, then recreate the DB project and re-import the DACPAC before pushing back to Team Services. This time however, when I imported the DACPAC, it appended "_2" to every single item in the DB project.

I'm sure it has something to do with the fact that I tried the import once already, but I'm not sure how to go about cleaning it up. Is there still a copy of the original import somewhere in my local branch that I need to delete? I don't see any indication of it in the solution, and no errors or messages were given to me when importing the DACPAC the second time.


Solution

  • DACPAC import adds the number if the file already exists. I remember something similar happened to me, for that, i cleaned the solution and re-imported all the sql files from SQL using DACPAC.