Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including DLL in dacpac file

I am hoping to use SMO to deploy a dacpac onto a remote SQL environment, away from my own development machine. In my project I reference a .dll file that is outputted into my build directory when I press "Build Solution".

Is it possible to bundle the .dll file with the dacpac or will I have to place my referenced files with the dacpac file onto the remote server, into a specified folder in order to reference them?

Currently I am receiving the error "No file was supplied for reference dll" when deploying in a remote environment as the dacpac has not included the dll within it even when I set "Copy Local" to true.

When opening Model.xml I can see that the file is pointing to where the reference is located on my hard-drive, how can I change this to dynamically look in the outputted dacpac folder?

Thanks

like image 211
superfurryanimals Avatar asked Nov 11 '22 20:11

superfurryanimals


1 Answers

You need DLLs along with your DACPAC only for the deployment. After successful deployment neither DACPACs nor DLLs are required (how would SQL Server be able to find them -- it can only find assemblies in GAC or those created by CREATE ASSEMBLY). You may check the SQL script created for the deployment and you'll see that all DLLs are included in it as CREATE/ALTER ASSEMBLY.

Be sure to use newest version of SSDT.

like image 108
Endrju Avatar answered Nov 15 '22 07:11

Endrju