Open waylew-abc opened 4 months ago
How are you adding the reference to master.dacpac? Do you see the master.dacpac in your output folder when you build?
I never had to do that in previous versions. I assumed, that since its a nuget, it would download the dacpac during the dotnet restore call, has this changed with 0.15?
From: Z Chen @.> Sent: Thursday, March 14, 2024 1:27 PM To: microsoft/DacFx @.> Cc: Wayne Lewalski @.>; Author @.> Subject: [EXTERNAL] Re: [microsoft/DacFx] cant find 'master.dacpac' with Microsoft.Build.Sql v 0.1.15-preview (Issue microsoft/azuredatastudio#25517)
How are you adding the reference to master.dacpac? Do you see the master.dacpac in your output folder when you build?
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azuredatastudio/issues/25517, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3NPZLIIT62RKKPHMRFZKPTYYHMZ7AVCNFSM6AAAAABEUWSSVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJXHE3TIOBWGU. You are receiving this because you authored the thread.
Nothing changed with PackageReference and your reference there looks good. May I ask how you are publishing to your local environment? Are you using sqlpackage or some other tool?
This could be caused by the change for microsoft/DacFx#329, we removed the full path to master.dacpac from the build output. During publish, DacFx will assume the path written to model.xml to be relative. Do you see master.dacpac in your output folder? What does the path look like if you look for the master.dacpac in obj/model.xml?
I am using publish via Azure Data Studio via the SQL Database Projects extsion v1.4.2
I do see the .dacpac within the bin/Debug folder
From: Z Chen @.> Sent: Monday, March 18, 2024 1:09 PM To: microsoft/DacFx @.> Cc: Wayne Lewalski @.>; Author @.> Subject: [EXTERNAL] Re: [microsoft/DacFx] cant find 'master.dacpac' with Microsoft.Build.Sql v 0.1.15-preview (Issue microsoft/azuredatastudio#25517)
Nothing changed with PackageReference and your reference there looks good. May I ask how you are publishing to your local environment? Are you using sqlpackage or some other tool?
This could be caused by the change for microsoft/DacFx#329https://github.com/microsoft/DacFx/issues/329, we removed the full path to master.dacpac from the build output. During publish, DacFx will assume the path written to model.xml to be relative. Do you see master.dacpac in your output folder? What does the path look like if you look for the master.dacpac in obj/model.xml?
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azuredatastudio/issues/25517, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A3NPZLKNSLVFGAY2BSPFFR3YY4NVLAVCNFSM6AAAAABEUWSSVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBUGQ4DENJZGM. You are receiving this because you authored the thread.
Thanks for sharing that info. I can reproduce the issue now. The issue is in this line of ADS: https://github.com/microsoft/azuredatastudio/blob/97d1a9f3e90cec5dd756056c533b6a448058f9cd/extensions/sql-database-projects/src/controllers/projectController.ts#L544
It copies the dacpac to a temp location before publish, but with changes in microsoft/DacFx#329, the master.dacpac also need to copied. I'll transfer this issue to ADS repo and send a fix soon.
Steps to Reproduce:
Did this occur in prior versions? If not - which version(s) did it work in? this worked in prior versions
updating to latest dacpac did not help