Print Page | Close Window

Type locator issue

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3822
Printed Date: 24-Oct-2025 at 2:41pm


Topic: Type locator issue
Posted By: smi-mark
Subject: Type locator issue
Date 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?



Replies:
Posted By: kimj
Date 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.


Posted By: smi-mark
Date 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. 


Posted By: smi-mark
Date Posted: 26-Nov-2012 at 1:32pm
That worked, thanks!


Posted By: eileenv
Date 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.


Posted By: kimj
Date 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?



Print Page | Close Window