views:

111

answers:

0

I'm using GDR2 (VSTS2008) to deploy a sql clr function to a target db (server: sql server 2008) via Team Build. The error is obvious in that the assembly does not exist on the target server. But, based on the documentation (Deploying CLR ) that there is on this topic, I'm assuming that by simply adding a reference to the assembly in the Database project 'dbproj', the deployment script would automatically generate the necessary 'create' script to add the assembly to the target database. However after deployment, I went through the generated sql deploy scripts and couldn't find a single 'create assembly' statement loading the 'CLRAssembly.SQL' assembly. (Deploy action is set to create script and deploy to db) I've also set properties for the referenced assembly in the dbproj with an appropriate owner (dbo), safe permission level, copied locally, and visiblily set to true.

I could explicitly create the assembly by adding a create assembly script in my schema objects folder of the dbproj, but that would mean that if I ever had to add to or modify the assembly, I'd have to come back to the dbproj and 'update' the 'create assembly' script to redeploy the dll. Also, in the case of changes made to the assembly, how would the dbproj know that the referenced clr assembly has been modified?

Am I missing something here or is there any additional information regarding this that I'm not aware of that would enable me to deploy the assembly to the target db without an explicit 'create assembly' script?