I found the problem, my app.config was wrong (hierarchy of nodes) and I do not know why nhibernate says the loggerProvider was not configured, it work back. Thanks
On Thu, Feb 20, 2014 at 1:14 PM, Felipe Oriani <[email protected]>wrote: > Hi friends, I'm creating a project with NHibernate in Windows Forms. > It was working fine but I update the reference of nhibernate to 3.3.1 and > fluent nhibernate to 1.4 and I get a error with a message: > > > *An unhandled exception of type 'System.TypeInitializationException' > occurred in FluentNHibernate.dll* > In the innerExceptions, I get a error message: > *The type initializer for 'NHibernate.LoggerProvider' threw an exception.* > > The problem is, I do not have configured any log in the sessionFactory. > What can I do to solve it? Look my code: > > var config = Fluently.Configure() > .Database(MsSqlConfiguration.MsSql2008.Dialect<MsSql2012Dialect>() > .ConnectionString(c => > c.FromConnectionStringWithKey("Default")) > .AdoNetBatchSize(50) > .QuerySubstitutions("true 1, false 0")) > .Cache(c => c.UseQueryCache()) > .CurrentSessionContext(IsInWebContext ? "managed_web" : "thread_static") > .Mappings(c => c.FluentMappings.AddFromAssemblyOf<ProductMap>()) > .BuildConfiguration(); > > Thank you all > > > -- > ______________________________________ > Felipe B Oriani > felipeoriani.com.br [email protected] > -- ______________________________________ Felipe B Oriani felipeoriani.com.br [email protected] -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/groups/opt_out.
