Not able to point SA to the correct assembly

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Not able to point SA to the correct assembly

Postby toma » Wed Aug 24, 2011 12:41 pm

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
toma
 
Posts: 3
Joined: Wed Aug 24, 2011 10:19 am
Location: Norway

Postby toma » Thu Aug 25, 2011 1:12 pm

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
toma
 
Posts: 3
Joined: Wed Aug 24, 2011 10:19 am
Location: Norway

Postby james.davies » Thu Aug 25, 2011 2:17 pm

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 GateSmartAssemblyThere 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
james.davies
 
Posts: 46
Joined: Tue Apr 19, 2011 2:39 pm

Postby toma » Thu Aug 25, 2011 3:02 pm

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...?
toma
 
Posts: 3
Joined: Wed Aug 24, 2011 10:19 am
Location: Norway

Same problem with Windows Phone SDK 7.1

Postby iosub » Tue Aug 30, 2011 7:04 pm

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
iosub
 
Posts: 19
Joined: Tue Oct 19, 2010 3:40 pm

mango sdk

Postby whitee » Mon Oct 24, 2011 5:21 pm

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.
whitee
 
Posts: 1
Joined: Mon Oct 24, 2011 5:15 pm

Postby Simon C » Tue Oct 25, 2011 11:07 am

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.
Simon C
 
Posts: 140
Joined: Tue Feb 26, 2008 4:56 pm
Location: Red Gate Software

Postby Simon C » Mon Oct 31, 2011 2:00 pm

Both these issues are fixed in the SA 6.5 release candidate - http://www.red-gate.com/MessageBoard/vi ... hp?t=14201
Simon C
 
Posts: 140
Joined: Tue Feb 26, 2008 4:56 pm
Location: Red Gate Software


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests

cron