|
We're now using 6.1.6. I have the following code within a class in an assembly that will be MEF'd into a shell application (along with a MEF'd in domain model assembly):
IdeaBlade.EntityModel.TransactionSettings.Default = new IdeaBlade.EntityModel.TransactionSettings(System.Transactions.IsolationLevel.ReadCommitted, new TimeSpan(0, 1, 0), false);
IdeaBladeConfig.ConfigFileLocation = @"\...\bla\someconfiglocation"; IdeaBlade.Core.Composition.CompositionHost.SearchFolders.Clear(); IdeaBlade.Core.Composition.CompositionHost.SearchFolders.Add(@"\...\some plugin folder"); IdeaBlade.Core.Composition.CompositionHost.SearchPatterns.Clear(); IdeaBlade.Core.Composition.CompositionHost.SearchPatterns.Add("DomainModelAssemblyName.dll");
AssemblyCatalog catalog = new AssemblyCatalog(assembly: Assembly.Load("DomainModelAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")); IdeaBlade.Core.Composition.CompositionHost.Add(catalog: catalog); DomainAssembly.EntityManager em = new DomainAssembly.EntityManager();
var entity = em.SomeEntitySet.Where(e => e.Id.Trim() == "someid").FirstOrDefault(); var prop = entity.SomePropery;
I get the following exception (thrown at the line in red)
Type 'IdeaBlade.EntityModel.EntityQueryProxy`1[[DomainModelAssembly.SomeEntitySet, DomainModelAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' is not known to the serializer. The following probe assemblies were found during initialization: DomainModelAssembly. Make sure that the assemblies holding your entity model and other known types are in this list. Check that your CompositionHost.SearchPatterns are correct. Also see the debug log to check for assembly load errors.
I've changed the names of the assemblies/types to protect the innocent, but you get the idea. The exception is telling me that it's found my domain model assembly, and yet I get an exception nonetheless.
Is there something we're missing??
|