It appears the example project has been somewhat neglected. The error message makes it quite clear:
Solution: Confirm that your deployment folder contains one of the following assemblies: NHibernate.ByteCode.LinFu.dll NHibernate.ByteCode.Castle.dll You should find that the Castle dll is included in the tools\nhibernate folder and just isn't copied to the example project output folder. I've now rectified this issue, though it will be a few days before my change is in the official trunk. 2009/12/25 KuMa1104 <[email protected]>: > Has downloaded an example with http://fluentnhibernate.org/I start in > f-ii > private static ISessionFactory CreateSessionFactory() > { > return Fluently.Configure() > .Database(SQLiteConfiguration.Standard > .UsingFile(DbFile)) > .Mappings(m => > m.FluentMappings.AddFromAssemblyOf<Program>()) > .ExposeConfiguration(BuildSchema) > .BuildSessionFactory(); > } > > Throws out an exception > Message = "Unable to load type > 'NHibernate.ByteCode.Castle.ProxyFactoryFactory, > NHibernate.ByteCode.Castle' during configuration of proxy factory > class. > Possible causes are: > The NHibernate.Bytecode provider assembly was not deployed. > The typeName used to... > > > > NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException: Unable > to load type 'NHibernate.ByteCode.Castle.ProxyFactoryFactory, > NHibernate.ByteCode.Castle' during configuration of proxy factory > class. > Possible causes are: > - The NHibernate.Bytecode provider assembly was not deployed. > - The typeName used to initialize the 'proxyfactory.factory_class' > property of the session-factory section is not well formed. > > Solution: > Confirm that your deployment folder contains one of the following > assemblies: > NHibernate.ByteCode.LinFu.dll > NHibernate.ByteCode.Castle.dll ---> System.IO.FileNotFoundException: > Could not load file or assembly 'NHibernate.ByteCode.Castle' or one of > its dependencies. Не удается найти указанный файл. > File name: 'NHibernate.ByteCode.Castle' > at System.Reflection.Assembly._nLoad(AssemblyName fileName, String > codeBase, Evidence assemblySecurity, Assembly locationHint, > StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean > forIntrospection) > at System.Reflection.Assembly.nLoad(AssemblyName fileName, String > codeBase, Evidence assemblySecurity, Assembly locationHint, > StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean > forIntrospection) > at System.Reflection.Assembly.InternalLoad(AssemblyName > assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, > Boolean forIntrospection) > at System.Reflection.Assembly.InternalLoad(String assemblyString, > Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean > forIntrospection) > at System.Reflection.Assembly.Load(String assemblyString) > at NHibernate.Util.ReflectHelper.TypeFromAssembly > (AssemblyQualifiedTypeName name, Boolean throwOnError) > at NHibernate.Util.ReflectHelper.ClassForName(String name) > at > NHibernate.Bytecode.AbstractBytecodeProvider.SetProxyFactoryFactory > (String typeName) > > === Pre-bind state information === > LOG: User = 205F397D3AE8475\макс > LOG: DisplayName = NHibernate.ByteCode.Castle > (Partial) > LOG: Appbase = file:///C:/Documents and Settings/макс/Рабочий стол/ > jagregory-fluent-nhibernate-ad70399/jagregory-fluent-nhibernate- > ad70399/src/Examples.FirstProject/bin/x86/Debug/ > LOG: Initial PrivatePath = NULL > Calling assembly : NHibernate, Version=2.1.2.4000, Culture=neutral, > PublicKeyToken=aa95f207798dfdb4. > === > LOG: This bind starts in default load context. > LOG: No application configuration file found. > LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET > \Framework\v2.0.50727\config\machine.config. > LOG: Policy not being applied to reference at this time (private, > custom, partial, or location-based assembly bind). > LOG: The same bind was seen before, and was failed with hr = > 0x80070002. > > --- End of inner exception stack trace --- > at > NHibernate.Bytecode.AbstractBytecodeProvider.SetProxyFactoryFactory > (String typeName) > at NHibernate.Cfg.Configuration.ConfigureProxyFactoryFactory() > at NHibernate.Cfg.Configuration.BuildSessionFactory() > at FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() > in C:\Documents and Settings\макс\Рабочий стол\jagregory-fluent- > nhibernate-ad70399\jagregory-fluent-nhibernate-ad70399\src > \FluentNHibernate\Cfg\FluentConfiguration.cs:line 93} > > > I touched nothing. How it to correct? > > -- > > You received this message because you are subscribed to the Google Groups > "Fluent NHibernate" 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/fluent-nhibernate?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Fluent NHibernate" 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/fluent-nhibernate?hl=en.
