When doing a refresh today of one of our D365FO Dev environments I encountered an issue that puzzled me a bit. I ran the following script to import the BacPac file:
cd C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin SqlPackage.exe /a:export /ssn:<server>.database.windows.net /sdn:MyNewCopy /tf:D:\Exportedbacpac\my.bacpac /p:CommandTimeout=1200 /p:VerifyFullTextDocumentTypesSupported=false /sp:<SQLAdmin password> /su:sqladmin
At first it was not able to find the folder 140\DAC\bin but there was a folder called 130\DAC\BIN
Unfortunately this SqlPackage file was too old to handle the BacPac file.
First I tried to update Management Studio… unfortunately that did not help. After researching a bit online I found Microsoft® SQL Server® Data-Tier Application Framework (18.2) which installed a later version of SqlPackage in C:\Program Files\Microsoft SQL Server\150\DAC\bin. That did the trick.