Red Gate forums :: View topic - BUG using the SmartAssembly command line
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 6
SmartAssembly 6 forum

BUG using the SmartAssembly command line

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Mike74



Joined: 24 Oct 2013
Posts: 1

PostPosted: Thu Oct 24, 2013 4:45 pm    Post subject: BUG using the SmartAssembly command line Reply with quote

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:
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:
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/Content/SmartAssembly/help/6.7/SA_UsingTheCommandLine documentation to create the comman line.

Hope you can help me !

Regards,

Mike
Back to top
View user's profile Send private message
jessica.ramos



Joined: 23 Apr 2012
Posts: 213

PostPosted: Fri Oct 25, 2013 6:43 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group