SQL CLR Assembly with Strings Encodesd

.NET obfuscator and automated error reporting

SQL CLR Assembly with Strings Encodesd

Postby icelorrio » Mon Feb 20, 2012 4:53 pm

I am trying to store on our SQL Server 2005 an assembly obfuscated with SmartAssembly 6.

When I try to encrypt the strings, it makes an assembly that is not valid for store into SQL Server 2005.
I tried with different configurations, and it also fails the simplest (no obfuscation, string encoding, no string encoding improvement, no string encrypt, no strnig cache)

That is a problem because we want to encrypt all the strings into the assembly.

This is the message:
Msg 6211, Level 16, State 1, Line 3
CREATE ASSEMBLY failed because type 'SmartAssembly.StringsEncoding.Strings' in safe assembly '<OUR_ASSEMBLY_NAME>' has a static field 'MustUseCache'. Attributes of static fields in external_access assemblies must be marked readonly in Visual C#, ReadOnly in Visual Basic, or initonly in Visual C++ and intermediate language.

Posts: 1
Joined: Mon Feb 20, 2012 4:33 pm

Postby Brian Donahue » Tue Feb 21, 2012 5:21 pm

Thanks - I believe you have already opened a support ticket about this with Red Gate and we will be in touch via email.

Preliminarily, it looks to me like the strings encoding feature wasn't compatible with CLR assemblies in v5 of SmartAssembly, was fixed in v6, and apparently broken again in 6.5.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 1 guest