2 matianhu matianhu 于 2014.08.05 10:42 提问

windows app store 中应用Nhibernate 报错。

代码如下:
public class NHibernateDBManager : INHibernateDBManager
{
private ISessionFactory sessionFactory;

    public string ConnectStringFilePath { get; set; }

    public string Language { get; set; }

    public void InitNHibernateDBManager()
    {
        var fileName=Path.Combine(Windows.ApplicationModel.Package.Current.InstalledLocation.Path, string.Format(ConnectStringFilePath,Language));
        var cfg = new NHibernate.Cfg.Configuration().Configure(fileName);//"/DBConfig/hibernate.cfg.xml");
        sessionFactory = cfg.BuildSessionFactory();
    }
}

当执行到cfg.BuildSessionFactory();时提示如下信息:
Could not create the driver from NHibernate.Driver.SQLite20Driver.
请教各路大神如何解决?

Csdn user default icon
上传中...
上传图片
插入图片