I am having an issue with one assembly I'm trying to obfuscate. When I build it using the GUI, I get an ArgumentOutOfRangeException (I see it as an error message while it's running the obfuscation, and I see it in the SmartAssembly log file - see attached). I'm not sure if this is my code that's creating the exception, or SmartAssembly's.
The weird part is that when I build my source code using the MSBuild integration I have set up, I get a different error:
error : SmartAssembly build failed:
error : Cannot find dependency 'BusinessObjects.Licensing.KeycodeDecoder, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304', which is required for assembly:
error : CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
This dependency is not set up to be merged or embedded for this .dll, and the project references this dependency by pointing to its installed location on the machine.
Questions:
1. Are these two errors related?
2. If I embed the dependency in the .saproj, will this get rid of the second error?
3. Will getting rid of the second error get rid of the first error?
After much testing, it seems that the issue is the BusinessObject.Licensing.KeycodeDecoder.dll is not a .NET managed assembly, which means that SmartAssembly has difficulty (if not outright refusal) processing it. It also seems the two issues were related, since solving the first solved the second one.
We got around the issue by making all CrystalReports dlls referenced by our code to be ignored, via the "NotAvailable" <Assembly> attribute in the .saproj file. This causes the MSBuild to pass, and performing a clean/rebuild on the dll in Visual Studio before running the build in SA GUI removes the second issue.
Comments
I am having an issue with one assembly I'm trying to obfuscate. When I build it using the GUI, I get an ArgumentOutOfRangeException (I see it as an error message while it's running the obfuscation, and I see it in the SmartAssembly log file - see attached). I'm not sure if this is my code that's creating the exception, or SmartAssembly's.
The weird part is that when I build my source code using the MSBuild integration I have set up, I get a different error:
This dependency is not set up to be merged or embedded for this .dll, and the project references this dependency by pointing to its installed location on the machine.
Questions:
1. Are these two errors related?
2. If I embed the dependency in the .saproj, will this get rid of the second error?
3. Will getting rid of the second error get rid of the first error?
We got around the issue by making all CrystalReports dlls referenced by our code to be ignored, via the "NotAvailable" <Assembly> attribute in the .saproj file. This causes the MSBuild to pass, and performing a clean/rebuild on the dll in Visual Studio before running the build in SA GUI removes the second issue.
To clarify the NotAvailable attribute, it would look like this in an saproj:
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?