I recently had to create some non-schema related objects for a database project I am working on. It caused an annoying problem with Red Gate SQL Compare where I was prompted each time I did the compare about “Non-Schema” scripts being ignored. On one hand I guess it is good it told me, on the other I was tired of seeing this repeatedly. I fixed the problem by doing the following.
Locate your target files and set them to Build Action None:
- Select target file
- Press F4 to bring up the properties window
- Select “None” from the drop down of the “Build Action” row
I then included these scripts as part of a pre-deployment script so that they would be created accordingly when running the VS SSDT publish. The result here is these objects won’t be deployed via SQL Compare, so you have to know your own process and make sure they are deployed somehow.
You might be wondering “What kind of objects cause this?” so here is the context of what I was working with:
- Master Key
- Symmetric Key