Red Gate forums :: View topic - Not able to point SA to the correct assembly
Return to www.red-gate.com RSS Feed Available

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

Not able to point SA to the correct assembly

Search in SmartAssembly 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
toma



Joined: 24 Aug 2011
Posts: 3
Location: Norway

PostPosted: Wed Aug 24, 2011 12:41 pm    Post subject: Not able to point SA to the correct assembly Reply with quote

Hi

I get an errormessage:
SmartAssembly has encountered an invalid symbol in xxx
[System.ComponentModel.DataAnnotations]
System.ComponentModel.DataAnnotations.EditableAttribute

The most likely cause is that SmartAssembly has used a different version of a dependency from the version used by xxxx.

Dependency found at:
c:\WINDOWS\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll

The version number of this dll SA found in the old GAC is 4.0.20506.1. That means it is from .NET Framework 4 Beta 1.

The one I need SmartAssembly to use has version number 4.0.30319.1 from .NET Framework 4.0 and it is located in the new GAC:
c:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll

It is also located here:
C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ComponentModel.DataAnnotations.dll
(This is the referenced path in VS2010 project file)

I have tried to add MandatoryPath in the project file and also tried to add the new GAC and/or other correct path to
"<DependenciesSearchPaths><SearchPath>" in SmartAssembly.settings.

Can anyone please tell me how I can force SA to use the correct dll version and not always try to use the wrong Beta 1 version in the old GAC?

kind regards
Tonny
Back to top
View user's profile Send private message
toma



Joined: 24 Aug 2011
Posts: 3
Location: Norway

PostPosted: Thu Aug 25, 2011 1:12 pm    Post subject: Reply with quote

I solved this myself.

Seems like .NET Framework 4 Beta 1 put dll's in the same GAC as .NET Framework 3.5 and those was not removed when I installed the released version of .NET Framework 4. I was not able to remove the extra (Beta 1 marked as v4) assemblies through windows explorer, gacutil.exe or GACBrowser. The extra assemblies was not removed when I uninstalled .NET Framework 3.5 either.

Found in the end that I through the "Add references" - dialog under the browse tab in Visual Studio could access and delete the extra Beta 1 assemblies. When all of them was gone SmartAssembly picked the correct assembly and worked as intended.

kind regards
Tonny
Back to top
View user's profile Send private message
james.davies



Joined: 19 Apr 2011
Posts: 46

PostPosted: Thu Aug 25, 2011 2:17 pm    Post subject: Reply with quote

Glad you got it sorted. FYI - you can control the folders searched by SA.
These are stored in an XML file: SmartAssembly.settings. This will be in a location like:

C:\Program Data\Red GateSmartAssembly
There will be an editable section that looks like:

<DependenciesSearchPaths>
<SearchPath>C:\Program Files (x86)\Microsoft Silverlight\4.0.50401.0</SearchPath>
<SearchPath>D:\Removed Folder</SearchPath>
</DependenciesSearchPaths>
_________________
Thanks,
James Davies
Technical Support Engineer
Red Gate Software
Back to top
View user's profile Send private message
toma



Joined: 24 Aug 2011
Posts: 3
Location: Norway

PostPosted: Thu Aug 25, 2011 3:02 pm    Post subject: Reply with quote

As you see in my first post I already tried that, and it did not work.
Seemed like SA ignores the DependencySearchPath in the settings file if the "correct" assembly is already found in the GAC...?
Back to top
View user's profile Send private message
iosub



Joined: 19 Oct 2010
Posts: 19

PostPosted: Tue Aug 30, 2011 7:04 pm    Post subject: Same problem with Windows Phone SDK 7.1 Reply with quote

Hi

I'm building a Windows Phone project with SDK 7.1

SA is getting the reference from GAC that are wrong (It's getting the ones from SDK 7.0)
I have try with MandatoryPath etc but it does not work, It always gets the 7.0 references instead of the 7.1

Is there a SOLUTION?

Thank you

The error is:


Error 9 SmartAssembly build failed:
SmartAssembly has encountered an invalid symbol in MSP.Phone.dll:

[Microsoft.Phone]Microsoft.Phone.Shell.ShellTile

The most likely cause is that SmartAssembly has used a different version of a dependency from the version used by MSP.Phone.dll.

If the details below are wrong, please use the MandatoryPath attribute in the .saproj file to ensure that the correct version of the dependency is found.

Assembly containing invalid symbol: C:\MSP\2010\Dev\Dev\Phone\MSP.Phone\obj\Release\MSP.Phone.dll

Dependency found at: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone\Microsoft.Phone.dll MSP.Phone
Back to top
View user's profile Send private message
whitee



Joined: 24 Oct 2011
Posts: 1

PostPosted: Mon Oct 24, 2011 5:21 pm    Post subject: mango sdk Reply with quote

Quote:
Hi

I'm building a Windows Phone project with SDK 7.1

SA is getting the reference from GAC that are wrong (It's getting the ones from SDK 7.0)
I have try with MandatoryPath etc but it does not work, It always gets the 7.0 references instead of the 7.1


I get the same result when I build.
Back to top
View user's profile Send private message
Simon C



Joined: 26 Feb 2008
Posts: 140
Location: Red Gate Software

PostPosted: Tue Oct 25, 2011 11:07 am    Post subject: Reply with quote

You'll be pleased to know that the next version of SmartAssembly, to be released very soon, will have support for WinPhone 7.1 and Silverlight 5, and we've also fixed the MandatoryPath not working for assemblies signed with the microsoft framework key.
Back to top
View user's profile Send private message Send e-mail
Simon C



Joined: 26 Feb 2008
Posts: 140
Location: Red Gate Software

PostPosted: Mon Oct 31, 2011 2:00 pm    Post subject: Reply with quote

Both these issues are fixed in the SA 6.5 release candidate - http://www.red-gate.com/MessageBoard/viewtopic.php?t=14201
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic 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