Hello!
Im now posting here because i think the english Forum is more activ.
Everytime when i execute my Program, will get the BindingFailure Error.
The NHibernate.XmlSerializers causes this error when i'm adding my assembly to Configuration
Here is the Message, Sorry it's in german, but if something is unclear i'll translate:
Die Assembly mit dem Anzeigenamen "NHibernate.XmlSerializers" konnte im "LoadFrom"-Bindungskontext der AppDomain mit ID 1 nicht geladen werden. Fehlerursache: System.IO.FileLoadException: Die Datei oder Assembly "NHibernate.XmlSerializers, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=""" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040) Dateiname: "NHibernate.XmlSerializers, Version=2.1.2.4000, Culture=neutral, PublicKeyToken="""
=== Zustandsinformationen vor Bindung === LOG: Benutzer = "MeinBenutzer" LOG: DisplayName = NHibernate.XmlSerializers, Version=2.1.2.4000, Culture=neutral, PublicKeyToken="", processorArchitecture=MSIL (Fully-specified) LOG: Appbase = ../bin/Debug/ LOG: Ursprünglicher PrivatePath = NULL Aufruf von Assembly : System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken="". === LOG: Diese Bindung startet im default-Load-Kontext. LOG: Die Anwendungskonfigurationsdatei wird verwendet: ..\"MeinProjekt".vshost.exe.Config LOG: Die Computerkonfigurationsdatei von c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config wird verwendet. LOG: Verweis nach der Richtlinie: NHibernate.XmlSerializers, Version=2.1.2.4000, Culture=neutral, PublicKeyToken="", processorArchitecture=MSIL LOG: Download von neuem URL ../bin/Debug/NHibernate.XmlSerializers.DLL. WRN: Der Vergleich des Assemblynamens führte zum Konflikt: PUBLIC KEY TOKEN. ERR: Das Setup der Assembly konnte nicht abgeschlossen werden (hr = 0x80131040). Die Suche wurde beendet.
Here is the Code, in the Bolt line the Error occurs:
configuration = new Configuration(); log4net.Config.XmlConfigurator.Configure(); configuration.Configure(); configuration.SetProperty("connection.driver_class", Config.GetData(Enums.Data.LocalDBDriver)); configuration.SetProperty("connection.connection_string", Config.GetData(Enums.Data.LocalDBConnectionString)); configuration.SetProperty("dialect", Config.GetData(Enums.Data.LocalDBDialect)); configuration.SetProperty("proxyfactory.factory_class", Config.GetData(Enums.Data.LocalDBFactory)); configuration.AddAssembly(typeof(Trace).Assembly); new SchemaUpdate(configuration).Execute(false, true); sessionFactory = configuration.BuildSessionFactory();
Very thanks for each post.
Greetings
Alexander
|