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.  [ 3 posts ] 
Author Message
 Post subject: Subfolder and assembly issue
PostPosted: Tue Nov 08, 2005 11:07 am 
Hi,

In my C# project (VisitorManagement) I have a subfolder (BusinessObjects) in which I have put the objects needed for NHibernate and the mapping files.

In the top of my web service I do a using VisitorManagement.BusinessObjects; and I'm able to use these objects. But When I invoke the web service I get the following error.

Code C#:
cfg = new Configuration();
cfg.AddAssembly("VisitorManagement.BusinessObjects");

Error:
NHibernate.MappingException: Could not add assembly named: VisitorManagement.BusinessObjects ---> System.IO.FileNotFoundException: File or assembly name VisitorManagement.BusinessObjects, or one of its dependencies, was not found.
File name: "VisitorManagement.BusinessObjects"

-----

Code C#:
cfg = new Configuration();
cfg.AddAssembly("VisitorManagement");

Error:
NHibernate.MappingException: persistent class VisitorManagement.BusinessObjects.TblAuthorisationLevel,VisitorManagement.BusinessObjects not found ---> System.IO.FileNotFoundException: File or assembly name VisitorManagement.BusinessObjects, or one of its dependencies, was not found.
File name: "VisitorManagement.BusinessObjects"


It works if I put all the classes in the same folder, but I'd rather stick to this alternative as it looks way cleaner.

If anybody knows how to sort this problem, I'll be gratefull.

Best reguards,

Pierre


Top
  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 11:20 am 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
What is the file name of the assembly? If the file is VisitorManagement.dll, the second Configuration should be OK. It looks like a class mapping is referencing the wrong assembly name.
Quote:
NHibernate.MappingException: persistent class VisitorManagement.BusinessObjects.TblAuthorisationLevel,VisitorManagement.BusinessObjects not found ---> System.IO.FileNotFoundException: File or assembly name VisitorManagement.BusinessObjects, or one of its dependencies, was not found.
The mapping should be "VisitorManagement.BusinessObjects.TblAuthorisationLevel,VisitorManagement" if the file is VisitorManagement.dll.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 09, 2005 5:46 am 
yeap thank you that was the problem :)


Top
  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.