Print Page | Close Window

Could not load type

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=542
Printed Date: 11-Jun-2026 at 12:22pm


Topic: Could not load type
Posted By: PJones
Subject: Could not load type
Date Posted: 13-Nov-2007 at 5:03am
When I attempt to get an object from my model I receive this error:
 
"{IdeaBlade.Persistence.PersistenceServerException: Could not load type 'DASvcBos.LookupPatternTypes' from assembly 'DASvcBos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. ---> System.TypeLoadException: Could not load type 'DASvcBos.LookupPatternTypes' from assembly 'DASvcBos, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at IdeaBlade.Persistence.Wcf.WcfPersistenceServerProxy.CheckConnection(Exception pException)
   at IdeaBlade.Persistence.PersistenceServerProxy.Fetch(SessionBundle pBundle, IEntityQuery pQuery)
   at IdeaBlade.Persistence.PersistenceManager.XFetchDataSet(IEntityQuery pEntityQuery)
   --- End of inner exception stack trace ---
   at DASvcBos.Program.Main(String[] args) in C:\Dev\DASvcWinConApp\Program.cs:line 996
   at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()}"
 
From this code:

DASvcBos.DASvcBosDataServiceProxy myBOSDataService =DASvcBos.DASvcBosDataServiceProxy.CreateDataService();

myBOSDataService.CurrentDBConnect =DASvcBos.connectToInstance.Repository;

// Get the current DB instance PM Object

PersistenceManager mPersMgr = myBOSDataService.GetCurrentPersistenceManager();

EntityQuery query;

query = new EntityQuery(typeof(DASvcBos.LookupPatternTypes),DASvcBos.LookupPatternTypes.PatternTypeIDEntityColumn,

EntityQueryOp.IsNotNull, null);

// Next Line fails with the above error! 

EntityList<DASvcBos.LookupPatternTypes> testObject =

mPersMgr.GetEntities<DASvcBos.LookupPatternTypes>(query);

The  object in question was generated by the reverse engineer tool and is untouched.
 
What does this error mean?
 
Kind regards,
 
Pete Jones
 



Replies:
Posted By: PJones
Date Posted: 13-Nov-2007 at 8:43am

I was able to locate the problem so there's no need to respond to this.



Posted By: Dominique
Date Posted: 06-Dec-2007 at 11:45pm
Hi,
Could you describe your solution?
:)

-------------
Dominique


Posted By: PJones
Date Posted: 07-Dec-2007 at 9:09am
Dominique,
 
The issue was that the object model had be re-compiled locally but the recompiled objects were not published out to the WCF Service so the class models did not match.
 
Pete Jones



Print Page | Close Window