I was getting the below error while trying to import database into DEV environment.
Error importing database: could not load package from dynamics 365 'D:\Exportedbacpac\swelltestupgradebackup.bacpac'. File contains corrupted data.
Solution:
-> Go to below link and download "Windows .NET Core" Zip file and extract it to C:\Temp.
https://docs.microsoft.com/en-us/sql/tools/sqlpackage-download?view=sql-server-ver15
From there, instead of using the Sqlpackage.exe under C:\Program Files (x86), please use the Sqlpackage.exe in C:\Temp\Sqlpackage-dotnetcore
Your import query will look like below
C:\Temp>SqlPackage.exe /a:import /sf:D:\Exportedbacpac\Testupgradebackup.bacpac /tsn:localhost /tdn:AxDB_fromProd1 /p:CommandTimeout=0