Problems deploying Entity Framework with Sitefinity v. 4.2
I have been trying to deploy Entity Framework v. 4.1 with Sitefinity v. 4.2 and I have been encountering exceptions all along the way which have completely baffled me.
After deploying my custom assemblies to the Sitefinity v. 4.2 bin directory, I get the following error message:
Could not load file or assembly 'Telerik.OpenAccess.Runtime,
Version=2011.1.510.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342'
or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Could not load file or assembly 'Telerik.OpenAccess.Runtime,
Version=2011.1.510.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342'
or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Could not load file or assembly 'Telerik.OpenAccess.Runtime,
Version=2011.1.510.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342'
or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Could not load file or assembly 'Telerik.OpenAccess.Runtime,
Version=2011.1.510.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342'
or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Could not load file or assembly 'Telerik.OpenAccess.Runtime,
Version=2011.1.510.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342'
or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Could not load file or assembly 'Telerik.OpenAccess.Runtime,
Version=2011.1.510.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342'
or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Could not load file or assembly 'Telerik.OpenAccess.Runtime,
Version=2011.1.510.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342'
or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Could not load file or assembly 'Telerik.OpenAccess,
Version=2011.1.510.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342'
or one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
This only seems to occur while deploying my Entity Framework assemblies and does not seem to render this error if I deploy projects that do not use Entity Framework.
Please advise as to how to successfully deploy Entity Framework alongside Sitefinity v. 4.2.
Hi Samir Vaidya,
Thank you for using our services.
Sitefinity 4.2 uses OpenAccess 2011 Q2 (2011.2.713.3 build). Your application says that it is missing version 2011.1.510, a version used in previous Sitefinity iterations. Is it possible that you are adding a third party assembly built to reference the earlier version of OA.
Best wishes,
Radoslav Georgiev
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
I checked in the bin directory and the version is the expected version compatible with v. 4.2. However, I directly upgraded my Sitefinity project using the Sitefinity Project Manager to v. 4.2 without performing a re-compile in Visual Studio after the upgrade. Do you think this could be the root cause of all of my problems?
You should be able to get around it with Assembly Binding to the proper version
So in the above example just add in a new OpenAccess node and plop in the public key and version
Nope, using Assembly Binding Redirection starts introducing a whole new host of problems with the System.Net and System.Windows assembly versions (looking for v. 2.0.5.0). Could this be due to the deployment of the System.Windows.dll assembly associated with Silverlight in the bin directory?
Hi Samir Vaidya,
Have you checked if you have some code library project that is not referencing the proper OpenAccess assembly? Also check if this code library project is pulling OA assembly from an OA installation instead from your website's bin folder.
All the best,
Radoslav Georgiev
the Telerik team