我对hibernate.cfg.xml使用以下代码
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="dialect">NHibernate.Dialect.MsSqlAzure2008Dialect</property>
<property name="connection.driver_class">NHibernate.Driver.SQLServerDriver</property>
<property name="connection.connection_string">Server=tcp:usedctp000dbs01.database.windows.net,1433;Initial Catalog=usedctp000db01;Persist Security Info=False;User ID={user};Password={password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication="Active Directory Password";</property>
<property name="show_sql">true</property>
</session-factory>
</hibernate-configuration>
当我运行BuildSessionFactory时,出现以下异常
NHibernate.HibernateException:'无法从以下位置创建驱动程序 NHibernate.Driver.SQLServerDriver。'
我发现了类似的问题,但与MySQL有关,解决方案是添加Mysql.Data.dll,您知道是否应该为Azure SQL Server上传类似的文件吗?我可以在哪里找到它?我尝试添加sqlsrv32.dll,但出现以下错误