DacFx icon indicating copy to clipboard operation
DacFx copied to clipboard

Extensions discovery issue in DacPac's DacServices.Deploy()

Open Pikhulya opened this issue 5 years ago • 1 comments

Due to specifics of our application we load the assembly Microsoft.SqlServer.Dac.dll, as well as all other it relies on, by leveraging the method Assembly.Load(byte[]). Then, once we call DacServices.Deploy(), it fails with the below ArgumentException:

image

because its implementation: image

is not ready to handle the contract of Assembly.Location saying: "... If the assembly is loaded from a byte array, such as when using the Load(Byte[]) method overload, the value returned is an empty string ("") ..."

So, the above ArgumentException is because Path.GetDirectoryName was supplied an empty string. The code should verify the property Assembly.Location for an empty string prior trying to use it.

Pikhulya avatar Aug 19 '20 03:08 Pikhulya

Are there plans to fix this issue?

Pikhulya avatar Sep 11 '21 08:09 Pikhulya