Great article. Very useful information.
One question I think could be answered and would be very useful to those noobs to CLR.
How do you get the varbinary representation for the creation of the assembly?
I am a CLR noob too so forgive me if this is not the correct answer or what you are looking for but...
Oops I meant binary representation as shown in the examples. If you already have a CLR deployed, that is great. But if you are building from scratch, how to get that binary representation so you don't have to deploy an external dll too.
Hi there, Jason. First off, thanks for that positive feedback. I am glad that you enjoyed the article.
Second, regarding getting the "bytes" / VARBINARY / hex code of the Assembly prior to it going into SQL Server, that is jumping a little bit ahead as I will cover that stuff in Level 4, but I can give the basics of it here :-). There are two ways to do it:
1) In the newer versions of Visual Studio, in the Project Properties, be sure to check "Generate DDL" and then Publish the project to a local DB. The generated DDL should have the assembly via
2) use a little command-line utility to convert a binary file into hex code text. I created one years ago to help me automate the building of SQL# as I include it in a post-build event :-). I hadn't yet decided if I was going to share that utility when I do Level 4-Development, or if so if I would include it in the article or publish it on https://SQLsharp.com/. For now, if you are interested then send me a PM here or contact me via the SQL# website.
Hope that helps. Take care, Solomon...