Build fails on dependency issue
cadi
Posts: 8
Hi, I have been using {sa} sucessfully for over a year now to obfuscate Silverlight assemblies. Recently, the Microsoft Silverlight Tools complained about a missing patch, and forced me to install the Silverlight Tools SP1 (http://go.microsoft.com/fwlink/?LinkId=143571). Since then, {sa} fails to build, with this error message:
What dependencies are meant here? Is this about Silverlight (my project references SL3 dlls), or about .NET ({sa} is a .NET app right)?
Any help would be appreciated - this is preventing me from releasing a critical update to my customers..
Casper
- using W2003ServerSP2, VS2008SP1, .NET3.5SP1, {sa} v4.0.3453
C:\Program Files\{smartassembly}\{smartassembly}.com ".\MyProject.{sa}proj" /output=$self {smartassembly} v4.0.3453 (c) 2005-2009 Cachupa Loading project .\MyProject.{sa}proj Output=D:\MyProject\obj\Release\MyProject.dll Analyzing... ERROR: {smartassembly} has encountered an invalid token in 'MyProject.dll': System.Void [System.Core]System.Action::.ctor(System.Object,System.IntPtr). This means that 'D:\MyProject\obj\Release\MyProject.dll' was built with a dependency which is not the same as the one used by {smartassembly}. You need to ensure that {smartassembly} uses the correct dependencies and try again.
What dependencies are meant here? Is this about Silverlight (my project references SL3 dlls), or about .NET ({sa} is a .NET app right)?
Any help would be appreciated - this is preventing me from releasing a critical update to my customers..
Casper
- using W2003ServerSP2, VS2008SP1, .NET3.5SP1, {sa} v4.0.3453
Comments
It's the same issue as discussed here. I'm still waiting for a fix for this too.
If it really is the same issue, then it would mean that the tool is confusing the version of the .NET mscorlib it is using, with the version of the Silverlight mscorlib that my target assembly references.. :shock:
@Eaton: Is there a possibility that I can try that build? My license does not entitle me to upgrade to 5.1 (was using the 3 and upgraded to 4). Of course I am looking into upgrading again, but in the mean time, I am hoping for a fix on the v4.0. It stopped working overnight, and I got a commercial product to obfuscate and release asap.
Casper
Look in the EAP forum below, that is where they can be found. And I doubt Red Gate would backport a fix into an earlier version.
It is definitely the same cause though as SmartAssembly is having difficulty finding the correct version of the Silverlight framework libraries to use.
Can I just confirm a few things (apologies for asking the obvious questions):
Did the update install anything else (for instance the Silverlight 4 runtimes as this will cause issues for v4.x)?
You might want to try the trial of SmartAssembly 5 (https://www.red-gate.com/dynamic/downloads/downloadform.aspx?download=smartassembly) to see if it fixes the issue.
Thanks for that pointer, indeed v5.2.0.43 does build without problems, at least that is good to know
Still hoping for a word from Red Gate (or the original {sa} people) on this matter though..
Casper
Ah, I just missed this post while trying out the EAP version, sorry about that.
- references are all SL3, nothing from .NET
- project was fine before the update
- machine did get a SL4 runtime installation, but the SL SDK and Tools and such are all the proper SL3
- and yes, the official 5.1 also builds fine
I will follow up with PM, thanks again for looking into this.
Casper
Silverlight is rather odd as it doesn't install the runtime libraries side-by-side, unlike the rest of the .NET framework. This means that when you have Silverlight 4 runtimes installed and are trying to build Silverlight 2 and 3 app it has to use the framework libraries from the relevant SDKs.
Unfortunately SmartAssembly 4.x didn't handle this stepping back to the SDKs if the Silverlight 4 runtime was installed.