BUG using the SmartAssembly command line

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

BUG using the SmartAssembly command line

Postby Mike74 » Thu Oct 24, 2013 4: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 :
My.OpenAssembly
OpenAssembly

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
  Input=D:\\Release\\My.Assembly.To.Protect.dll
  Output=D:\\NewRelease\\My.Assembly.To.Protect.dll
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:
My.Assembly.To.Protect
My.OpenAssembly
OpenAssembly

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 !

Regards,

Mike
Mike74
 
Posts: 1
Joined: Thu Oct 24, 2013 4:11 pm

Postby jessica.ramos » Fri Oct 25, 2013 6: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.
jessica.ramos
 
Posts: 235
Joined: Mon Apr 23, 2012 1:13 pm


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests