У меня проблемы с настройкой и запуском NHibernate под SharePoint 2010.
Мой код конфигурации работает, так как у меня нормально работает проект интеграционного тестирования.
Проблема связана с сборками gacи ссылки NHibernate, приводящие к этой ошибке:
[FileNotFoundException: Could not load file or assembly 'NHibernate.ByteCode.Castle' or one of its dependencies. The system cannot find the file specified.]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +416
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166
System.Reflection.Assembly.Load(String assemblyString) +35
NHibernate.Util.ReflectHelper.TypeFromAssembly(AssemblyQualifiedTypeName name, Boolean throwOnError) +641
NHibernate.Bytecode.AbstractBytecodeProvider.SetProxyFactoryFactory(String typeName) +67
[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]
NHibernate.Bytecode.AbstractBytecodeProvider.SetProxyFactoryFactory(String typeName) +336
NHibernate.Cfg.Configuration.ConfigureProxyFactoryFactory() +179
NHibernate.Cfg.Configuration.BuildSessionFactory() +23
FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() +50
FYI, NHibernate.ByteCode.Castle зарегистрирован в gac.У меня также есть эти два элемента в web.config:
<compilation batch="false" debug="true">
<assemblies>
<add assembly="NHibernate.ByteCode.Castle, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4" />
....
&
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<qualifyAssembly partialName="NHibernate.ByteCode.Castle, Version=3.1.0.4000, Culture=neutral" fullName="NHibernate.ByteCode.Castle, Version=3.1.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4" />
...
Какие-либо подсказки относительно дополнительной проводки требуется?