Not able to point SA to the correct assembly
toma
Posts: 4
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
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
Comments
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
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>
James Davies
Technical Support Engineer
Red Gate Software
Seemed like SA ignores the DependencySearchPath in the settings file if the "correct" assembly is already found in the GAC...?
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
I get the same result when I build.