Error in Deepdata mock-up

Error in Deepdata mock-up

Old forum URL: forums.lhotka.net/forums/t/4212.aspx


strick9 posted on Tuesday, January 22, 2008

I have been making an app in the DeepData DTO flavor.  I'm doing this more to understand the physical separation of the data access code than the parent/child illustration.  In my version, while debugging, in DataFactory and running the following line...
Dim dalType As Type = Type.GetType(AppSettings("ClientData"), True, True)
... I get the error ...
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll.

FYI, AppSettings("ClientData") returns "Our.DAL.ClientTypes.ClientData,Our.DAL.ClientTypes" just like the downloadable DeepData example.  If I take out the ", True, True)" from the line, then dalType is nothing and the error occurs on the Acctivator.CreateInstance. 

I've looked all all I know to, and asked VB forums about this (I know it is not CSLA specific) and have no answer.  The problem must be in something that I have not setup.  Do any of you have any ideas?

Thanks,
Strick9

RockfordLhotka replied on Tuesday, January 22, 2008

Type.GetType() looks for the type in all assemblies in the execution directory. Are you sure your DAL assembly is in the same directory as the host EXE?

strick9 replied on Tuesday, January 22, 2008

Exactly right. 

Thanks for stepping out of your box to help me with the "little stuff".

Copyright (c) Marimer LLC