SQL Package on linux looks for dacpac external dacpacs with UPPCASE filenames regardless of the original
When restoring a dacpac that references another dacpac (linked server) sqlpackage expect that the filename is DATABASE.DACPAC regardless of what the original filename was.
Create 2 projects of type SQL Server Database projects in visual studio, use title case DatabaseOne DatabaseTwo
Add a database reference from DatabaseOne to DatabaseTwo
Build Grab the outputted dacpac files
On a Linux machine / container use sqlpackage to restore the dacpac of DatabaseOne.dacpac
DatabaseOne and DatebaseTwo are published
sqlpackage fails looking for \original path\DATABASETWO.DACPAC
Michael Ryan commented
Same issue... had to rename my .dacpac files to uppercase to address the issue.
Suggestion would be to get all files for CWD, and see if UCASE(FILENAME) matches and use the first match as a final fallback... it's really pretty painful as-is.
Piotr Gadecki commented
Roman Buga commented
I also have this problem. It's due to the fact that dacpac built by VS for some reason has ALL UPPERCASE references.