Solomon Rutzky continues his CLR Strict Security series with an easier way of creating a secure assembly:
This solution is easier than Solution 1:
8 steps instead of 22!
No extra Project
However, a very small amount of risk was added by overriding the default MSBuild workflow for SSDT. This risk can be eliminated if Microsoft provides a pre-defined Target for the appropriate event. Please upvote my suggestion to have this happen: Add MSBuild predefined Targets for “BeforeSqlBuild” and “BeforePublish” to SSDT SQL Server Data Projects.
ALSO: Even though we did not sign the assembly with a Strong Name Key, it is still probably a good idea to do that.
If you use CLR, this is worth the read.