These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: BindingFailure when adding assembly to configuration
PostPosted: Wed Jul 28, 2010 4:48 am 
Newbie

Joined: Tue Jul 27, 2010 9:51 am
Posts: 2
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.