Discussion:
[nhusers] TypeLoadException: Could not load type 'NHibernate.Dialect.MsSql2017Dialect' from assembly 'NHibernate, Version=5.1.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4'.
h***@gmail.com
2018-05-23 18:52:00 UTC
Permalink
Why can I not create a connection to MS Sql Server 2017 using NHibernate
5.1.2?

using System;
using NHibernate.Cfg;

namespace ConfigByXML
{
class Program
{
static void Main(string[] args)
{
var nhConfig = new Configuration().Configure();
var sessionFactory = nhConfig.BuildSessionFactory();
Console.WriteLine("NHibernate Configured!");
Console.ReadKey();
}
}
}

<?xml version="1.0" encoding="utf-8"?>

<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">
NHibernate.Dialect.MsSql2012Dialect, NHibernate
</property>
<property name="connection.connection_string">
Server=.\SQLEXPRESS; Database=NHCookbook;
Trusted_Connection=SSPI
</property>
<property name="adonet.batch_size">
100
</property>
</session-factory>
</hibernate-configuration>
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Loading...