大家好:
   代码如下:
Configuration cfg = new Configuration();

// cfg.AddXmlFile("TestDll.User.hbm.xml");
// cfg.AddAssembly("TestDll");
cfg.AddClass(typeof(TestDll.User));
ISessionFactory factory = cfg.BuildSessionFactory();
ISession session = factory.OpenSession();
ITransaction transaction = session.BeginTransaction();
User newUser = new User();
newUser.Id = "joe_cool6";
newUser.UserName = "Joseph Cool";
newUser.Password = "abc123";
newUser.EmailAddress = "[email protected]";
newUser.LastLogon = DateTime.Now;
                       
// Tell NHibernate that this object should be saved
session.Save(newUser);
 
// commit all of the changes to the DB and close the ISession
transaction.Commit();
session.Close();错误提示:Resource: TestDll.User.hbm.xml not found 
用cfg.AddAssembly("TestDll");这句是可以的。
请问大家这是怎么回事啊?