1

I have built my database project for SQL Server 2012. And I am using following command to prepare deployment script,

"C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\SqlPackage.exe" /Action:Script /TargetDatabaseName:DacPacTest1 /TargetServerName:"demo2012util" /SourceFile:"C:\some\path\DBProject\Database\sql\debug\Database.dacpac" /op:"C:\some\path\DBProject\test2.sql"

I am getting this error

*** Could not load package from 'C:\some\path\DBProject\Database\sql\debug\Database.dacpac'. Could not find a part of the path 'C:\some\path\DBProject\Database\sql\debug\Database.dacpac'.

It appears that I might have wrong database target and this error is because of that, but I have verified that I have built project using SQL Server 2012 as target and SQLPackage.exe is also same SQL Server version (110).

Any suggestions?

JackLock
  • 1,168
  • 1
  • 13
  • 26
  • Running user may not have access to the other users folder. – Jacob H Feb 07 '18 at 16:39
  • Thanks for quick response. I am using it on my local dev machine. And I have admin privileges on this machine. And also being on Windows 10, I tried to run CMD as admin to make sure it is not actual reason. So, not sure if that is the reason. I can see that paths in my question might have caused confusion, I am updating it now. Do you have any other suggestion? – JackLock Feb 07 '18 at 16:55
  • Use the latest sqlpackage it will deploy to 2012 and the 110 version is really old (also does the path exist?) – Ed Elliott Feb 08 '18 at 05:49
  • @EdElliott I tried using sqlpackage.exe from SQL Serve 2017 as well. But same error. And path does exist (that is first thing I checked). – JackLock Feb 13 '18 at 17:51

0 Answers0