Cannot obfuscate using MSBuild
Mikhail Girkin
Posts: 6
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?
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?
Tagged:
Comments
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.
Does it help if, instead of using mandatory path, the assemblies are put in the GAC (if only for testing purposes)?
There unfortunately weren't any other replies on this, I'm sorry to say.
Just to confirm though, I thought that you were able get past this (when we worked on it via your ticket #96925) by using the NotAvailable attribute for BusinessObjects.Licensing.KeycodeDecoder.
<Assembly AssemblyName="BusinessObjects.Licensing.KeycodeDecoder, Culture=neutral, PublicKeyToken=null" NotAvailable="1">
Has this not worked? Please let me know if so!
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?