1) In test project options I have added all files from bin directory
of tested dll. Also i try to copy all files manually, but the effect
was the same :-(
2) I using Fluent to configure NHibernate, example:
public class NHibernateHelper
{
        private static ISessionFactory _sessionFactory;
        private static NHibernate.Cfg.Configuration _configuration;

        private static ISessionFactory SessionFactory
        {
                get
                {
                        if (_sessionFactory == null)
                        {
                                _sessionFactory = 
Configuration.BuildSessionFactory();
                        }
                        return _sessionFactory;
                }
        }

        public static NHibernate.Cfg.Configuration Configuration
        {
                get
                {
                        if (_configuration == null)
                        {
                                _configuration = Fluently.Configure()
                                                                
.Database(MsSqlCeConfiguration.Standard.ConnectionString
(mExpress.Domain.Properties.Settings.Default.Conn))
                                                                .Mappings(m => 
m.FluentMappings
                                                                        
.AddFromAssemblyOf<CategoryMap>()
                                                                        
.AddFromAssemblyOf<ProductMap>()
                                                                        
.AddFromAssemblyOf<TransactionDetailsMap>()
                                                                        
.AddFromAssemblyOf<TransactionMap>()
                                                                        
.AddFromAssemblyOf<TransactionTypeMap>()
                                                                        
.AddFromAssemblyOf<ClientMap>()
                                                                        
.AddFromAssemblyOf<CountryMap>()
                                                                        
.AddFromAssemblyOf<ClientMap>()
                                                                        
.AddFromAssemblyOf<WarehouseMap>()
                                                                        
.AddFromAssemblyOf<StockMap>()
                                                                        
.AddFromAssemblyOf<TaxMap>()
                                                                 
).BuildConfiguration();
                        }
                        return _configuration;
                }
        }

        public static ISession OpenSession()
        {
                return SessionFactory.OpenSession();
        }
}

This is exception message I have recive from InitializeData method:
Initialization method
mExpress.Domain.Tests.ProductRepositoryTest.InitializeData threw
exception. System.IO.FileLoadException:
System.IO.FileLoadException:   Nie można załadować pliku lub zestawu
'NHibernate, Version=2.1.0.4000, Culture=neutral,
PublicKeyToken=aa95f207798dfdb4' lub jednej z jego zależności.
Zlokalizowana definicja manifestu zestawu nie odpowiada odwołaniu do
zestawu. (Wyjątek od HRESULT: 0x80131040).
-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.


Reply via email to