Hi,
I have some warning/error message in the Logs and I would like to know if they are "normal" or should be treated (how ?).
The application doesn't know the model, after the login we download a XAP file which have 3 assemblies. One for the model, one named services where the UOF, connectionsoptions, etc are located and the last one having the view/viewmodels and providing few other services
In this last one, one service (named CompanyRequirementVerificator, see below) need to import a UOW.
The Log below are shown just before the call of UpdateAssemblySourceFromCatalog
in the FrameworkBootstrapper.OnCatalogRecomposed methode.
'iexplore.exe' (Silverlight) : 'MyApp.Commun.Services' chargé, symboles chargés.
'iexplore.exe' (Silverlight) : 'c:\Program Files (x86)\Microsoft Silverlight\5.0.61118.0\fr\mscorlib.debug.resources.dll' chargé
'iexplore.exe' (Silverlight) : 'MyApp.Commun.Domain.SL' chargé, symboles chargés.
'iexplore.exe' (Silverlight) : 'MyApp.Context.AutoLoad' chargé, symboles chargés.
System.ComponentModel.Composition Warning: 1 : The ComposablePartDefinition 'MyApp.Context.AutoLoad.Verificators.EtablissementRequirementVerificator' has been rejected. The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
1) No valid exports were found that match the constraint '((exportDefinition.ContractName == "MyApp.Interfaces.Repositories.IUnitOfWorkManager(MyApp.Commun.Services.UnitsOfWork.ISelectionEtbUnitOfWork)") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso "MyApp.Interfaces.Repositories.IUnitOfWorkManager(MyApp.Commun.Services.UnitsOfWork.ISelectionEtbUnitOfWork)".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected.
Resulting in: Cannot set import 'MyApp.Context.AutoLoad.Verificators.EtablissementRequirementVerificator..ctor (Parameter="unitOfWorkManager", ContractName="MyApp.Interfaces.Repositories.IUnitOfWorkManager(MyApp.Commun.Services.UnitsOfWork.ISelectionEtbUnitOfWork)")' on part 'MyApp.Context.AutoLoad.Verificators.EtablissementRequirementVerificator'.
Element: MyApp.Context.AutoLoad.Verificators.EtablissementRequirementVerificator..ctor (Parameter="unitOfWorkManager", ContractName="MyApp.Interfaces.Repositories.IUnitOfWorkManager(MyApp.Commun.Services.UnitsOfWork.ISelectionEtbUnitOfWork)") --> MyApp.Context.AutoLoad.Verificators.EtablissementRequirementVerificator --> AssemblyCatalog (Assembly="MyApp.Context.AutoLoad, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")
later, after the call to UpdateAssemblySourceFromCatalog, have those Logs :
168 : 25/04/2012 20:08:41 : : IdeaBlade.EntityModel.WcfProxy`1:CreateProxyCore : Trying programmatic configuration of EntityServer+SecurityFake
169 : 25/04/2012 20:08:41 : : IdeaBlade.EntityModel.WcfProxy`1:CreateProxyCore : Created proxy to EntityServer+SecurityFake using Uri http://localhost:9010/EntityServer+SecurityFake.svc/sl
170 : 25/04/2012 20:08:41 : : Cocktail.PartLocator`1:WriteTrace : Probed for service with contract IAuthenticationService and found MyApp.Application.Authentication.MyAppAuthenticationService
171 : 25/04/2012 20:08:42 : : Cocktail.LogFns:DebugWriteLine : MyApp.Application.AppBootstrapper+<LoadModulesCore>d__8:MoveNext: Chargement des modules : AutoLoad, LaunchPoint
172 : 25/04/2012 20:08:42 : : Cocktail.PartLocator`1:WriteTrace : Probed for service with contract IAuthenticationService and found MyApp.Application.Authentication.MyAppAuthenticationService
173 : 25/04/2012 20:08:42 : : Cocktail.DefaultDebugLogger:LogWriter : Screen INFO: Deactivating MyApp.Application.ViewModels.Login.LoginViewModel.
174 : 25/04/2012 20:08:42 : : Cocktail.DefaultDebugLogger:LogWriter : Screen INFO: Closed MyApp.Application.ViewModels.Login.LoginViewModel.
175 : 25/04/2012 20:08:42 : : Cocktail.DefaultDebugLogger:LogWriter : Coroutine INFO: Coroutine execution completed.
176 : 25/04/2012 20:08:42 : : IdeaBlade.Core.Composition.PartsCatalog:LoadCatalogCore : Error loading assembly 'MyApp.Commun.Services.dll' for PartsCatalog, but will retry. Initial error: Impossible de charger un ou plusieurs des types requis. Extrayez la propriété LoaderExceptions pour plus d'informations.
=> Translation is : Impossible to load one or many of the required type.
177 : 25/04/2012 20:08:42 : : IdeaBlade.Core.Composition.PartsCatalog:LoadCatalogCore : Assembly 'MyApp.Commun.Domain.SL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' added to PartsCatalog
178 : 25/04/2012 20:08:42 : : IdeaBlade.Core.Composition.PartsCatalog:LoadCatalogCore : Assembly 'MyApp.Context.AutoLoad, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' added to PartsCatalog
179 : 25/04/2012 20:08:42 : : IdeaBlade.Core.Composition.PartsCatalog:LoadCatalogCore : Assembly 'MyApp.Commun.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' added to PartsCatalog
180 : 25/04/2012 20:08:42 : : IdeaBlade.Core.Composition.PartsCatalog:LoadCatalog : Probe assemblies found in dynamic content: MyApp.Commun.Domain.SL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null :: MyApp.Context.AutoLoad, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null :: MyApp.Commun.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
181 : 25/04/2012 20:08:42 : : IdeaBlade.Core.Composition.PartsCatalog:OnRecomposed : Dynamic content added: MyApp.Context.AutoLoad.xap, loaded without error
As you can see, it say on the line 181 all is done without error. And it's true as I can use the module CompanyRequirementVerificator which generated the first warning.
I did another test. I removed the Model from the XAP and added a reference to it in the main application. In this case I have no error in the logs.