私はCastle WindsorとNHibernate Integration
Facilityの問題を再現するためのサンプルプロジェクトを作成しました。
私は次の例外があります:
Method not found: 'Void Castle.Core.DependencyModel..ctor(Castle.Core.DependencyType, System.String, System.Type, Boolean)'.
次のスタックトレースを使用します。
at Castle.Facilities.NHibernateIntegration.Internal.NHSessionComponentInspector.ProcessModel(IKernel kernel, ComponentModel model)
at Castle.MicroKernel.ModelBuilder.DefaultComponentModelBuilder.<>c__DisplayClass6.b__4(IContributeComponentModelConstruction c)
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at Castle.MicroKernel.ModelBuilder.DefaultComponentModelBuilder.BuildModel(IComponentModelDescriptor[] customContributors)
at Castle.MicroKernel.Registration.ComponentRegistration`1.Castle.MicroKernel.Registration.IRegistration.Register(IKernelInternal kernel)
at Castle.MicroKernel.DefaultKernel.Register(IRegistration[] registrations)
at Castle.Facilities.NHibernateIntegration.NHibernateFacility.RegisterDefaultConfigurationBuilder()
at Castle.Facilities.NHibernateIntegration.NHibernateFacility.RegisterComponents()
at Castle.Facilities.NHibernateIntegration.NHibernateFacility.Init()
at Castle.MicroKernel.Facilities.AbstractFacility.Castle.MicroKernel.IFacility.Init(IKernel kernel, IConfiguration facilityConfig)
at Castle.MicroKernel.DefaultKernel.AddFacility(IFacility facility)
at Castle.Windsor.WindsorContainer.AddFacility(IFacility facility)
at Castle.Windsor.Installer.DefaultComponentInstaller.SetUpFacilities(IConfiguration[] configurations, IWindsorContainer container, IConversionManager converter)
at Castle.Windsor.Installer.DefaultComponentInstaller.SetUp(IWindsorContainer container, IConfigurationStore store)
at Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers, DefaultComponentInstaller scope)
at Castle.Windsor.WindsorContainer.Install(IWindsorInstaller[] installers)
at CW3_FluentNH_Integration_Tester.Main.Main() in D:Documents and SettingscannizrmDesktopWindsor3FluentTesterCW3_FluentNH_Integration_TesterCW3_FluentNH_Integration_TesterMain.vb:line 28
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
私は次のDLLバージョンがあります:
Castle.Core.dll - 3.0.0.2230
Castle.Windsor.dll - 3.0.0.2325
Castle.Facilities.NHibernateIntegration.dll - 1.1.039
FluentNHibernate.dll - 1.3.0.717
Iesi.Collections.dll - 3.2.0.4000
NHibernate.dll - 3.2.0.4000
これは、コンテナをロードし、Fluent NH
Configurationをインストールするために使用しているサンプルコードです。
Imports Castle.Windsor
Module Main
#Region " Declarations "
Private objContainer As IWindsorContainer
#End Region
#Region " Properties "
Public ReadOnly Property Container As IWindsorContainer
Get
If objContainer Is Nothing Then
objContainer = New WindsorContainer()
End If
Return objContainer
End Get
End Property
#End Region
#Region " Functions "
Sub Main()
Container.Install(Castle.Windsor.Installer.Configuration.FromXmlFile ("Configshibernate.cfg.xml"))
End Sub
#End Region
End Module
これは使用されるサンプルのXML設定ファイルです:
<?xml version="1.0" encoding="utf-8" ?>
true
NHibernate.Connection.DriverConnectionProvider
NHibernate.Driver.SqlClientDriver
NHibernate.Dialect.MsSql2005Dialect
Data Source=.SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True
ベストアンサー
私はこれをプロジェクトトラッカーの問題として登録し、それを解決するための2つのパッチファイルを含んでいます。