Red Gate forums :: View topic - Cannot obfuscate using MSBuild
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

Cannot obfuscate using MSBuild

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



Joined: 24 Jun 2013
Posts: 4

PostPosted: Mon Jun 24, 2013 11:02 am    Post subject: Cannot obfuscate using MSBuild Reply with quote

Hi!

We are experiencing strange problems with RedGate SmartAssembly while obfuscating a solution using MSBuild.

Let me explain in detail.

1) The error we've got:
SmartAssembly build failed:
Cannot find dependency 'Interop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null', which is required for assembly:
AxInterop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null
HTMLEditorControl, Version=1.0.4923.24795, Culture=neutral, PublicKeyToken=49fa31e76fed3520
OrganizationWeaver, Version=1.0.0.0, Culture=neutral, PublicKeyToken=49fa31e76fed3520

Ensure that this dependency is in the main assembly folder, or in the Global Assembly Cache (GAC).

2) We tried to do this on various computers, and all of them got the error like that. But it happened with different dll's (NLog, Antlr3.Runtime)

3) .saproj file contains:
<Assembly AssemblyName="Interop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null" MandatoryPath="..\Prereqs\Interop.SHDocVw.dll">
<Merging Merge="0">
<Pruning Prune="0">
<Exclusion />
</Pruning>
<Obfuscation Obfuscate="0">
<Exclusion />
</Obfuscation>
<ControlFlow Obfuscate="0" />
<MemberRefsProxy Proxy="0" />
<ResourcesCompression />
</Merging>
<Embedding Embed="1" />
</Assembly>

As you can see, we intentionally specified MandatoryPath attribute, and all the dll's are there.

How could we tackle this problem?
May be we incorrectly understand path calculcation in SmartAssembly? What path it takes as a starting point?
Back to top
View user's profile Send private message AIM Address
Chris.Allen



Joined: 12 Mar 2009
Posts: 594

PostPosted: Tue Jun 25, 2013 12:09 pm    Post subject: Reply with quote

Can you retry but use absolute paths and not relative paths?
Back to top
View user's profile Send private message
Mikhail Girkin



Joined: 24 Jun 2013
Posts: 4

PostPosted: Wed Jun 26, 2013 2:36 pm    Post subject: Reply with quote

We tried. It didn't help.
Also I noticed, if I make a mistake in the path to dll's - it shows completely anoher error, like:

SmartAssembly build failed:
Mandatory assembly 'C:\Users\Mike V. Girkin\Documeasdnts\Projects\Tor\OW_Fresh\Prereqs\AxInterop.SHDocVw.dll' not found for 'AxInterop.SHDocVw, Version=1.1.0.0, Culture=neutral, PublicKeyToken=49fa31e76fed3520'

So our error is not connected to the paths, and SmartAssembly could find the dll's. But it shows that it could not.

The most strange thing is, that on different computers, the dll it could not find - differs.
Back to top
View user's profile Send private message AIM Address
Chris.Allen



Joined: 12 Mar 2009
Posts: 594

PostPosted: Wed Jun 26, 2013 2:55 pm    Post subject: Reply with quote

There's a difference in the public key token value each time- can you check you are specifying the right tokens?

Does it help if, instead of using mandatory path, the assemblies are put in the GAC (if only for testing purposes)?
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 594

PostPosted: Wed Jun 26, 2013 3:11 pm    Post subject: Reply with quote

Pleas ensure you have the very latest version too (Check for updates, on left in GUI). There have been some bug fixes to assembly resolution.
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