Print Page | Close Window

Unable to locate type

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2308
Printed Date: 29-Jul-2026 at 10:05am


Topic: Unable to locate type
Posted By: bstearns
Subject: Unable to locate type
Date Posted: 15-Nov-2010 at 11:42am
Hello
 
 
I am having a problem where my entity service is throwing this error when I call it from a silverlight client.  I am using Devforce universal 6.0.6
 
Caught exception: System.Exception: Unable to locate type: SomeName.DomainModel.Country, SomeName.DomainModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null at IdeaBlade.Core.TypeWrapperSL.FindType() at IdeaBlade.Core.TypeWrapperSL.Restore() at IdeaBlade.Core.TypeWrapperSL.get_Type() at  .........
 
There is the two different domain models, the main domain model and then the silverlight domain model that links in the business objects from the domain model.  Both of these asseblies live in the same namespace SomeName.DomainModel but the assemblies are named differently SomeName.DomainModel vs SomeName.DomainModel.SL.  Which to my understanding is OK since 6.0.4.
 
In the old documentation there was a bit about the assembly namespaces not matching so I went back with reflector and checked this.  Through reflector I can see that in both assemblies the Country type has the exact same namespace and version number. 
 
If anyone can point me in the right direction to fix this it would be apprcieated.
 
Thanks
B



Replies:
Posted By: kimj
Date Posted: 15-Nov-2010 at 1:26pm
I don't have an immediate answer, but here are some things to look for or double-check:
 
 - Make sure that the domain model assemblies are actually deployed:  the SL assembly should  be in the application XAP, and the .NET assembly in the bin folder of the web application.
 
- Out-of-sync assemblies, either DevForce or your own.  (This really is always worth double checking :) ).
 
- If types in the SL assembly point to multiple .NET assemblies.  For example, the Country type might point to SomeName.DomainModel, while the State type points to a different assembly. 


Posted By: bstearns
Date Posted: 16-Nov-2010 at 11:43am

Thanks for the reply. 

As you hinted at the issue had to do with the domain model not getting deployed with the web application.  Make sure that it gets deployed properly and works as advertised.
 
Thanks
B



Print Page | Close Window