Red Gate forums :: View topic - Build fails on dependency issue
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly 5
SmartAssembly 5 forum

Build fails on dependency issue

Search in SmartAssembly 5 forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
cadi



Joined: 20 Jul 2010
Posts: 6
Location: Rotterdam

PostPosted: Tue Jul 20, 2010 10:54 am    Post subject: Build fails on dependency issue Reply with quote

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:
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
Back to top
View user's profile Send private message
craigm



Joined: 23 Jun 2010
Posts: 9

PostPosted: Wed Jul 21, 2010 10:37 am    Post subject: Reply with quote

Hi.

It's the same issue as discussed here. I'm still waiting for a fix for this too.
Back to top
View user's profile Send private message
Eaton



Joined: 18 May 2010
Posts: 16

PostPosted: Wed Jul 21, 2010 3:08 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
cadi



Joined: 20 Jul 2010
Posts: 6
Location: Rotterdam

PostPosted: Wed Jul 21, 2010 4:52 pm    Post subject: Reply with quote

@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.. Shocked

@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. Sad

Casper
Back to top
View user's profile Send private message
Eaton



Joined: 18 May 2010
Posts: 16

PostPosted: Wed Jul 21, 2010 4:53 pm    Post subject: Re: Reply with quote

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.. Shocked

@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. Sad

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.
Back to top
View user's profile Send private message AIM Address
Paul.Martin



Joined: 03 Feb 2010
Posts: 83
Location: Cambridgeshire

PostPosted: Wed Jul 21, 2010 5:24 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
cadi



Joined: 20 Jul 2010
Posts: 6
Location: Rotterdam

PostPosted: Wed Jul 21, 2010 5:27 pm    Post subject: Re: Reply with quote

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 Smile

Still hoping for a word from Red Gate (or the original {sa} people) on this matter though..

Casper
Back to top
View user's profile Send private message
cadi



Joined: 20 Jul 2010
Posts: 6
Location: Rotterdam

PostPosted: Wed Jul 21, 2010 5:45 pm    Post subject: Re: Reply with quote

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 Very Happy

I will follow up with PM, thanks again for looking into this.
Casper
Back to top
View user's profile Send private message
Paul.Martin



Joined: 03 Feb 2010
Posts: 83
Location: Cambridgeshire

PostPosted: Wed Jul 21, 2010 5:53 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. 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