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.  [ 6 posts ] 
Author Message
 Post subject: How to AddAssembly without adding reference in a project?
PostPosted: Sat Jun 16, 2007 5:52 am 
Newbie

Joined: Sat Jun 16, 2007 4:53 am
Posts: 4
Hi. I've tried to addAssembly to Configuration object without adding a reference to this assembly in my core project. In assembly I've added, there is a mapping file created as embbeded resource and a POCO class. Error has occured in Configuration.AddAssembly() method with the message "persistent class Fc.DAO.CdrRaw, TariffingPugin not found".
Fc.DAO.CdrRaw - is the class in my assembly I've tried to add.
TariffingPugin is the name of assembly I've tried to add.
So, once again, I can't add reference on this assembly to the core project to let NHibernate load this assembly without errors.
Is it possible to solve this problem? Help me, please.
Thank you,


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 16, 2007 7:53 am 
Regular
Regular

Joined: Sun Jan 21, 2007 4:33 pm
Posts: 65
It sure is possible to solve this problem: Add the assembly to the project.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 17, 2007 12:54 am 
Newbie

Joined: Sat Jun 16, 2007 4:53 am
Posts: 4
Thank you for your reply.
Can you tell me how to add assembly to a project dynamically? I can't find any information about it.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 17, 2007 2:07 am 
Newbie

Joined: Sat Jun 16, 2007 4:53 am
Posts: 4
I can't add reference manually cause dll I'm trying to add reference on is a plugin. II can't add reference each time to a newly created plugin because it needs recompilation of the core project.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 17, 2007 3:42 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You don't need to add a reference, just put the assembly somewhere where NHibernate will be able to find it. NHibernate uses Assembly.Load to load assemblies, so consult the documentation of that function for more help.

The simplest way would probably be to put the assembly in the directory of your application's executable.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 17, 2007 4:46 am 
Newbie

Joined: Sat Jun 16, 2007 4:53 am
Posts: 4
Thank you for reply, it helps... but now another error's occured.
When I'm tring to call... for example ISession.Get(typeof(T), id) in my core project for class T from pluggin - the error occured with the message "Unknown entity class: T"

T - is the class from third-party dll (my pluggin). Do You know how to solve this problem?


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

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.