Print Page | Close Window

Silverlight 5 Linq problems

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3255
Printed Date: 28-Mar-2024 at 8:22am


Topic: Silverlight 5 Linq problems
Posted By: Grappler
Subject: Silverlight 5 Linq problems
Date Posted: 09-Feb-2012 at 12:24pm
My app has been running just fine for 2 years and still works properly in Silverlight 4.  Netflix is making everyone move up to Silverlight 5. Under Silverlight 5 my app now throws the following error anytime I hit a Where clause like:

IEntityQuery qUserPassword = App.mDomainModelEntityManager.Users.Where(c => c.UserName == aUserName && c.UserPassword == aUserPassword && c.IsInactive == false);

the error thrown is:

System.Exception: Unable to locate type: System.Linq.IQueryable`1[[DomainModel.User, StrataTrak, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Core, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e

If I un-install Silverlight 5 and reinstall Silverlight 4 - it works just fine.

Any ideas?



Replies:
Posted By: kimj
Date Posted: 09-Feb-2012 at 2:22pm
Is this an application built for Silverlight 4 but running in Silverlight 5?  Or an application which you've retargeted to Silverlight 5?
 
An error locating a type speaks more to the possibility of assemblies - either yours of DevForce's - being out-of-sync between client and server, or a potential probing problem.   Which version of DevForce are you running?


Posted By: Grappler
Date Posted: 09-Feb-2012 at 2:57pm
IdeaBlade 5.2.1.0


Posted By: kimj
Date Posted: 10-Feb-2012 at 10:51am
DevForce 5.2.1 -- which is an early release of the "DevForce 2009" generation of the product -- was built for Silverlight 3. DevForce 2009 is a legacy product, we don't sell it, and we encourage any customers still using it to upgrade to DevForce 2010. DevForce 2010, as of the 6.1.5.1 release, contains native support for both Silverlight 4 and Silverlight 5. It's a more robust product all around than DF2009, and it's not usually too hard to upgrade.
 
As for the error here - the version number of the System.Core assembly in both Silverlight 3 and 4 was 2.0.5.0, while it's now 5.0.5.0 in Silverlight 5. Some type shipping by SL, and type mapping by DevForce, does take place, so generally an application written for an earlier version may work. I would first check your XAP here to see which versions of the Silverlight assemblies are included. Also check the runtime version setting in the app manifest, and the minRuntimeVersion and autoUpgrade parameters on the Silverlight plugin object in the asp/htm page hosting the application.



Print Page | Close Window