New Posts New Posts RSS Feed: Type locator issue
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Type locator issue

 Post Reply Post Reply
Author
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post Topic: Type locator issue
    Posted: 26-Nov-2012 at 12:31pm
I've just moved some projection classes to a new project, and am now having a strange issue. I have a Desktop and a SL project, and the DebugLog.xml indicates they are found, however I get this issue when querying:

Unable to locate type: System.Linq.IOrderedQueryable`1[[Admin.Model.Projections.UserListItem, Admin.Model.SL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.Core, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e. Check that the assembly holding this type is available in the bin/exe folder. Also check that both your assemblies and DevForce assemblies have the expected version number on both client and server.


<entry id="34" timestamp="2012-11-26T14:22:50" username="" source="IdeaBlade.EntityModel.KnownTypeHelper:&lt;GetMarkedKnownTypes&gt;b__13">Probed for known types and found Admin.Model.Projections.UserListItem</entry>

Any suggestions on what I can try?
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 26-Nov-2012 at 1:04pm
This is a known bug in both DevForce 2010 and 2012 which we haven't fixed yet. This isn't actually a known type issue, but a problem with the type mapping needed to pass objects of generic types between tiers. The problem will occur when the client and server assemblies have different names and DevForce hasn't yet "seen" the type and assembly.
 
The workaround is to use the same assembly name for both the SL and desktop projects. Another option, although I'm not certain it works in all cases, is to rearrange your code somehow so that one or more entity types in this new assembly have been queried before running this projection query.
Back to Top
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post Posted: 26-Nov-2012 at 1:11pm
Thanks, Kim. I thought it was something like that, from looking through the type code. The problem is there are no entities in this model, it's just projections at the moment. I'll try making them the same assembly name. 
Back to Top
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post Posted: 26-Nov-2012 at 1:32pm
That worked, thanks!
Back to Top
eileenv View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 15-Jun-2007
Location: United States
Posts: 68
Post Options Post Options   Quote eileenv Quote  Post ReplyReply Direct Link To This Post Posted: 17-Jul-2013 at 2:58pm
Kim, it this still a known bug? I'm running into this issue now with a Desktop and WinRT assembly.
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 17-Jul-2013 at 4:47pm
It should have been fixed in the 7.1.2 release.  If you're using that release or later, can you send me more information on the exception text and solution structure?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down