Build fails on dependency issue

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, Alex.Davies, melvyn.harbour

Build fails on dependency issue

Postby cadi » Tue Jul 20, 2010 10:54 am

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:

Code: Select all
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
cadi
 
Posts: 6
Joined: Tue Jul 20, 2010 10:28 am
Location: Rotterdam

Postby craigm » Wed Jul 21, 2010 10:37 am

Hi.

It's the same issue as discussed here. I'm still waiting for a fix for this too.
craigm
 
Posts: 9
Joined: Wed Jun 23, 2010 1:13 pm

Postby Eaton » Wed Jul 21, 2010 3:08 pm

Have you tried the latest nightly build? I would have thought they would have fixed it already since it was reported before 5.1 was released.
Eaton
 
Posts: 16
Joined: Tue May 18, 2010 4:20 am

Postby cadi » Wed Jul 21, 2010 4:52 pm

@craigm: Your issue was reported over a month ago.. could you not use {sa} all this time, or did you find a workaround?

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
cadi
 
Posts: 6
Joined: Tue Jul 20, 2010 10:28 am
Location: Rotterdam

Re:

Postby Eaton » Wed Jul 21, 2010 4:53 pm

cadi wrote:@craigm: Your issue was reported over a month ago.. could you not use {sa} all this time, or did you find a workaround?

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.
Eaton
 
Posts: 16
Joined: Tue May 18, 2010 4:20 am

Postby Paul.Martin » Wed Jul 21, 2010 5:24 pm

I think this might be a slightly different problem as cadi is just using CLR2 so shouldn't have multiple different mscorlibs, although the Silverlight framework is slight strange.

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):
[List]
[*]Your assemblies all target Silverlight 3 and .NET 3.5?
[*]The project built fine before you installed the update

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.
Paul.Martin
 
Posts: 83
Joined: Wed Feb 03, 2010 11:20 am
Location: Cambridgeshire

Re:

Postby cadi » Wed Jul 21, 2010 5:27 pm

Eaton wrote: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.


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
cadi
 
Posts: 6
Joined: Tue Jul 20, 2010 10:28 am
Location: Rotterdam

Re:

Postby cadi » Wed Jul 21, 2010 5:45 pm

Paul.Martin wrote:Can I just confirm a few things [..]
[*]Your assemblies all target Silverlight 3 and .NET 3.5?
[*]The project built fine before you installed the update

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


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 :D

I will follow up with PM, thanks again for looking into this.
Casper
cadi
 
Posts: 6
Joined: Tue Jul 20, 2010 10:28 am
Location: Rotterdam

Postby Paul.Martin » Wed Jul 21, 2010 5:53 pm

Glad the release version fixed it.

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.
Paul.Martin
 
Posts: 83
Joined: Wed Feb 03, 2010 11:20 am
Location: Cambridgeshire


Return to SmartAssembly 5

Who is online

Users browsing this forum: No registered users and 1 guest