BUG using the SmartAssembly command line

.NET obfuscator and automated error reporting

BUG using the SmartAssembly command line

Postby Mike74 » Thu Oct 24, 2013 3:45 pm

Hi all,

I have a problem using the command line, and it seems to be a bug (or a misunderstood !!), let me explain with a simple example ...

I have an assembly called My.Assembly.To.Protect

The several assemblies are :

I run the following command line :

Code: Select all
SmartAssembly.com /create "My.Assembly.To.Protect.saproj" /input="D:\\Release\\My.Assembly.To.Protect.dll" /output="D:\\NewRelease\\My.Assembly.To.Protect.dll /assembly="My.Assembly.To.Protect ";prune:true,merge:true,embed:true,nameobfuscate:true,controlflowobfuscate:4,dynamicproxy:false,compressencryptresources:false

The result of the command is :
Code: Select all
SmartAssembly v6.8.0.121
Copyright © Red Gate Software 2005-2013
Loading project D:\\My.Assembly.To.Protect.saproj
Loading main assembly...

Assembly "My.Assembly.To.Protect": Pruning on
Assembly "My.Assembly.To.Protect": Name Mangling on
Assembly "My.Assembly.To.Protect": Control Obfuscation set to level 4
Assembly "My.Assembly.To.Protect": Dynamic References Proxy off
Assembly "My.Assembly.To.Protect": Resource Compression off
The assembly name 'My.Assembly.To.Protect' is not valid for embedding.
The following assemblies are valid with the '/assembly' switch:

ERROR: At least one of the specified assembly names is not valid.

If I chose another dependency for the option /assembly (My.OpenAssembly or OpenAssembly), it works correctly. I have no trouble like that using the SmartAssembly GUI.

I use https://www.red-gate.com/supportcenter/ ... ommandLine documentation to create the comman line.

Hope you can help me !


Posts: 1
Joined: Thu Oct 24, 2013 3:11 pm

Postby jessica.ramos » Fri Oct 25, 2013 5:43 pm

Hi Mike,

It looks like the command line is saying that the main assembly "My.Assembly.To.Protect" can be embedded, but the embed switch will actually only work on dependencies of the main assembly.

So sorry about this misleading error. I've logged an issue for it with internal reference SA-1760 --thanks for bringing it to our attention!

If you remove the embed:true for the main assembly and instead add it to the assembly options for the particular dependencies My.OpenAssembly or OpenAssembly that you'd like to embed, that should resolve it! But please let us know if there are any further issues.
Jessica Ramos
Technical Support
Red Gate Software Ltd.
Posts: 370
Joined: Mon Apr 23, 2012 12:13 pm

Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests