Skip to content

NH-3807 - Support for .NET Core 2.0 #633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
22165b0
Eliminate usage of protected field uniqueKeyPropertyName.
ngbrown Dec 28, 2017
73868e1
Don't throw then catch exception in Component if no componentClassNam…
ngbrown Dec 8, 2017
629340b
Implement helpers to serialize system types in preparation for .NET C…
ngbrown Nov 5, 2017
c0ac1e4
Serialize system types in preparation for .NET Core.
ngbrown Nov 4, 2017
e132813
NH-4008 - Move MsSql constants from driver to dialect.
ngbrown Oct 11, 2017
6619d67
NH-4008 - Fix description of DB2400Driver.
ngbrown Oct 10, 2017
ea2c6d4
NH-4008 - Driver code formatting tweaks.
ngbrown Oct 16, 2017
21da886
NH-4008 - Centralize all driver detection for tests.
ngbrown Oct 11, 2017
59ac0f4
NH-4008 - Add separate driver projects for NuGet dependencies.
ngbrown Dec 8, 2017
6cdb111
NH-4008 - Enable separate drivers for tests.
ngbrown Nov 9, 2017
e4a332f
NH-4008 - document driver changes.
fredericDelaporte Dec 10, 2017
6b6371b
Merge remote-tracking branch 'origin/feature/no-reflection-serializat…
ngbrown Jan 26, 2018
fe17917
Merge remote-tracking branch 'origin/NH-4008' into NH-3807
ngbrown Jan 26, 2018
18988aa
NH-3807 - Replace Is.BinarySerializable usage.
ngbrown Dec 29, 2017
d83ab6a
NH-3807 - Replace Is.IsXmlSerializable usage.
ngbrown Dec 29, 2017
7223acc
NH-3807 - Report RuntimeFramework in Example web project.
ngbrown Dec 29, 2017
aa5638b
ReSharper DotSettings migrated to new version.
ngbrown Dec 29, 2017
92cacd4
NH-3807 - .netstandard 2.0 project
ngbrown Jan 3, 2018
28d69e6
NH-3807 - Test projects weren't showing up under .NETCoreApp in ReSha…
ngbrown Jan 3, 2018
0670a96
NH-3807 - Check that enlisted transactions were disposed
ngbrown Jan 3, 2018
ef1ee6a
NH-3807 - Ignore tests that don't work with distributed transactions …
ngbrown Jul 16, 2017
1b283dd
NH-3807 - Configure Log4Net for tests independently of any app.config.
ngbrown Jan 3, 2018
f603ccd
NH-3807 - Handle new overloads of String.Trim*() in .NET Core 2.0.
ngbrown Jul 22, 2017
9d9bd33
NH-3807 - Specify connection string instead of lookup name.
ngbrown Jan 4, 2018
cdfce3c
NH-3807 - No SetApartmentState in Linux
ngbrown Jan 26, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion build-common/nhibernate-properties.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<project xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd">
<property name="nhibernate.dialect" value="NHibernate.Dialect.MsSql2008Dialect" overwrite="false"/>
<property name="nhibernate.command_timeout" value="444" overwrite="false"/>
<property name="nhibernate.connection.driver_class" value="NHibernate.Driver.Sql2008ClientDriver" overwrite="false"/>
<property name="nhibernate.connection.driver_class" value="NHibernate.Driver.SqlServer2008Driver, NHibernate.Driver.SqlServer" overwrite="false"/>
<property name="nhibernate.connection.connection_string" value="Server=.\SQLExpress;initial catalog=nhibernate;Integrated Security=SSPI" overwrite="false"/>
</project>
2 changes: 1 addition & 1 deletion build-common/teamcity-hibernate.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<property name="format_sql">true</property>

<!-- This is the System.Data.dll provider for MSSQL Server -->
<property name="connection.driver_class">NHibernate.Driver.Sql2008ClientDriver</property>
<property name="connection.driver_class">NHibernate.Driver.SqlServer2008Driver, NHibernate.Driver.SqlServer</property>
<property name="dialect">NHibernate.Dialect.MsSql2008Dialect</property>
<property name="connection.connection_string">Server=.\SQLExpress;initial catalog=nhibernate;Integrated Security=SSPI</property>
<property name="show_sql">false</property>
Expand Down
7 changes: 6 additions & 1 deletion default.build
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
<property name="bin-pack.tmpdir" value="${build.dir}/tmp-bin" />
<property name="bin-pack.conf-template" value="${bin-pack.tmpdir}/Configuration_Templates" />
<property name="bin-pack.required" value="${bin-pack.tmpdir}/Required_Bins" />
<property name="bin-pack.drivers" value="${bin-pack.tmpdir}/Select_Single_Driver" />
<property name="bin-pack.tests" value="${bin-pack.tmpdir}/Tests" />

<copy file="releasenotes.txt" todir="${bin-pack.tmpdir}"/>
Expand Down Expand Up @@ -169,7 +170,11 @@
<include name="Remotion.Linq.EagerFetching.???" />
</fileset>
</copy>
<!--Required Bins for lazy loading NHibernate.ByteCode.Castle.dll-->
<copy todir="${bin-pack.drivers}">
<fileset basedir="${bin.dir}">
<include name="NHibernate.Driver.*.???" />
</fileset>
</copy>
<!-- Tests -->
<copy file="${bin.dir}/TestEmbeddedConfig.cfg.xml" todir="${bin-pack.tests}"/>
<copy file="${bin.dir}/ABC.hbm.xml" todir="${bin-pack.tests}"/>
Expand Down
100 changes: 77 additions & 23 deletions doc/reference/modules/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@ var session = sessions.OpenSession(conn);
take care of setting the <literal>IDriver</literal> using a sensible default. See the API
documentation of the specific dialect for the defaults.
</para>
<para>
Since NHibernate v5.1, drivers having a NuGet package for their data provider have a
<literal>NHibernate.Driver</literal> dedicated assembly, which have to be referenced by your project.
Those assemblies are also available as NuGet packages.
If an obsolete driver is configured, NHibernate will issue a warning log when building the session
factory.
</para>
</entry>
</row>
<row>
Expand Down Expand Up @@ -1186,9 +1193,13 @@ in the parameter binding.</programlisting>
<entry>Firebird</entry>
<entry><literal>NHibernate.Dialect.FirebirdDialect</literal></entry>
<entry>
Set <literal>driver_class</literal> to
<literal>NHibernate.Driver.FirebirdClientDriver</literal>
for Firebird ADO.NET provider 2.0.
Install NuGet package
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.Firebird/">NHibernate.Driver.Firebird</ulink>
and set <literal>driver_class</literal> to
<literal>NHibernate.Driver.FirebirdDriver, NHibernate.Driver.Firebird</literal>
with a fallback on the built-in reflection based
<literal>NHibernate.Driver.FirebirdClientDriver</literal>.
Both use Firebird ADO.NET provider.
</entry>
</row>
<row>
Expand Down Expand Up @@ -1219,65 +1230,99 @@ in the parameter binding.</programlisting>
<row>
<entry>Microsoft SQL Server 7</entry>
<entry><literal>NHibernate.Dialect.MsSql7Dialect</literal></entry>
<entry></entry>
<entry>Use the same default driver as <literal>NHibernate.Dialect.MsSql2000Dialect</literal>.</entry>
</row>
<row>
<entry>Microsoft SQL Server 2000</entry>
<entry><literal>NHibernate.Dialect.MsSql2000Dialect</literal></entry>
<entry></entry>
<entry>
Install NuGet package
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.SqlServer/">NHibernate.Driver.SqlServer</ulink>
and set <literal>driver_class</literal> to
<literal>NHibernate.Driver.SqlServer2000Driver, NHibernate.Driver.SqlServer</literal>
with a fallback on the built-in reflection based
<literal>NHibernate.Driver.SqlClientDriver</literal>.
Both use <literal>System.Data.SqlClient</literal>.
</entry>
</row>
<row>
<entry>Microsoft SQL Server 2005</entry>
<entry><literal>NHibernate.Dialect.MsSql2005Dialect</literal></entry>
<entry></entry>
<entry>Use the same default driver as <literal>NHibernate.Dialect.MsSql2000Dialect</literal>.</entry>
</row>
<row>
<entry>Microsoft SQL Server 2008</entry>
<entry><literal>NHibernate.Dialect.MsSql2008Dialect</literal></entry>
<entry></entry>
<entry>
Install NuGet package
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.SqlServer/">NHibernate.Driver.SqlServer</ulink>
and set <literal>driver_class</literal> to
<literal>NHibernate.Driver.SqlServer2008Driver, NHibernate.Driver.SqlServer</literal>
with a fallback on the built-in reflection based
<literal>NHibernate.Driver.Sql2008ClientDriver</literal>.
Both use <literal>System.Data.SqlClient</literal>.
</entry>
</row>
<row>
<entry>Microsoft SQL Azure Server 2008</entry>
<entry><literal>NHibernate.Dialect.MsSqlAzure2008Dialect</literal></entry>
<entry></entry>
<entry>Use the same default driver as <literal>NHibernate.Dialect.MsSql2008Dialect</literal>.</entry>
</row>
<row>
<entry>Microsoft SQL Server 2012</entry>
<entry><literal>NHibernate.Dialect.MsSql2012Dialect</literal></entry>
<entry></entry>
<entry>Use the same default driver as <literal>NHibernate.Dialect.MsSql2008Dialect</literal>.</entry>
</row>
<row>
<entry>Microsoft SQL Server Compact Edition</entry>
<entry><literal>NHibernate.Dialect.MsSqlCeDialect</literal></entry>
<entry>
Install NuGet package
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.SqlServer.Compact/">NHibernate.Driver.SqlServer.Compact</ulink>
and set <literal>driver_class</literal> to
<literal>NHibernate.Driver.SqlServerCompactDriver, NHibernate.Driver.SqlServer.Compact</literal>
with a fallback on the built-in reflection based
<literal>NHibernate.Driver.SqlServerCeDriver</literal>.
Both use <literal>System.Data.SqlServerCe</literal>.
</entry>
</row>
<row>
<entry>Microsoft SQL Server Compact Edition 4.0</entry>
<entry><literal>NHibernate.Dialect.MsSqlCe40Dialect</literal></entry>
<entry>Use the same default driver as <literal>NHibernate.Dialect.MsSqlCeDialect</literal>.</entry>
</row>
<row>
<entry>MySQL 3 or 4</entry>
<entry>MySQL 3 or 4</entry>
<entry><literal>NHibernate.Dialect.MySQLDialect</literal></entry>
<entry></entry>
<entry>
Install NuGet package
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.MySql/">NHibernate.Driver.MySql</ulink>
and set <literal>driver_class</literal> to
<literal>NHibernate.Driver.MySqlDriver, NHibernate.Driver.MySql</literal>
with a fallback on the built-in reflection based
<literal>NHibernate.Driver.MySqlDataDriver</literal>.
Both use <literal>MySql.Data</literal>.
</entry>
</row>
<row>
<entry>MySQL 5</entry>
<entry><literal>NHibernate.Dialect.MySQL5Dialect</literal></entry>
<entry></entry>
<entry>Use the same default driver as <literal>NHibernate.Dialect.MySQLDialect</literal>.</entry>
</row>
<row>
<entry>MySQL 5 Inno DB</entry>
<entry><literal>NHibernate.Dialect.MySQL5InnoDBDialect</literal></entry>
<entry></entry>
<entry>Use the same default driver as <literal>NHibernate.Dialect.MySQLDialect</literal>.</entry>
</row>
<row>
<entry>MySQL 5.5</entry>
<entry><literal>NHibernate.Dialect.MySQL55Dialect</literal></entry>
<entry></entry>
<entry>Use the same default driver as <literal>NHibernate.Dialect.MySQLDialect</literal>.</entry>
</row>
<row>
<entry>MySQL 5.5 Inno DB</entry>
<entry><literal>NHibernate.Dialect.MySQL55InnoDBDialect</literal></entry>
<entry></entry>
<entry>Use the same default driver as <literal>NHibernate.Dialect.MySQLDialect</literal>.</entry>
</row>
<row>
<entry>Oracle</entry>
Expand All @@ -1299,15 +1344,17 @@ in the parameter binding.</programlisting>
<entry><literal>NHibernate.Dialect.Oracle12cDialect</literal></entry>
<entry></entry>
</row>
<row>
<entry>PostgreSQL</entry>
<entry><literal>NHibernate.Dialect.PostgreSQLDialect</literal></entry>
<entry></entry>
</row>
<row>
<entry>PostgreSQL</entry>
<entry><literal>NHibernate.Dialect.PostgreSQLDialect</literal></entry>
<entry>
Install NuGet package
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.PostgreSql/">NHibernate.Driver.PostgreSql</ulink>
and set <literal>driver_class</literal> to
<literal>NHibernate.Driver.PostgreSqlDriver, NHibernate.Driver.PostgreSql</literal>
with a fallback on the built-in reflection based
<literal>NHibernate.Driver.NpgsqlDriver</literal>.
Both use <literal>Npgsql</literal>.
</entry>
</row>
<row>
Expand All @@ -1316,6 +1363,7 @@ in the parameter binding.</programlisting>
<entry>
This dialect supports <literal>FOR UPDATE NOWAIT</literal>
available in PostgreSQL 8.1.
Use the same default driver as <literal>NHibernate.Dialect.PostgreSQLDialect</literal>.
</entry>
</row>
<row>
Expand All @@ -1325,22 +1373,28 @@ in the parameter binding.</programlisting>
This dialect supports <literal>IF EXISTS</literal> keyword in
<literal>DROP TABLE</literal> and <literal>DROP SEQUENCE</literal>
available in PostgreSQL 8.2.
Use the same default driver as <literal>NHibernate.Dialect.PostgreSQLDialect</literal>.
</entry>
</row>
<row>
<entry>PostgreSQL 8.3</entry>
<entry><literal>NHibernate.Dialect.PostgreSQL83Dialect</literal></entry>
<entry>
This dialect supports <literal>XML</literal> type.
Use the same default driver as <literal>NHibernate.Dialect.PostgreSQLDialect</literal>.
</entry>
</row>
<row>
<entry>SQLite</entry>
<entry><literal>NHibernate.Dialect.SQLiteDialect</literal></entry>
<entry>
Set <literal>driver_class</literal> to
<literal>NHibernate.Driver.SQLite20Driver</literal>
for System.Data.SQLite provider for .NET 2.0.
Install NuGet package
<ulink url="https://www.nuget.org/packages/NHibernate.Driver.SQLite/">NHibernate.Driver.SQLite</ulink>
and set <literal>driver_class</literal> to
<literal>NHibernate.Driver.SQLiteDriver, NHibernate.Driver.SQLite</literal>
with a fallback on the built-in reflection based
<literal>NHibernate.Driver.SQLite20Driver</literal>.
Both use <literal>System.Data.SQLite</literal>.
<para>
Due to
<ulink url="https://system.data.sqlite.org/index.html/tktview/44a0955ea344a777ffdbcc077831e1adc8b77a36">the
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate.Config.Templates/FireBird.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ for your own use before compile tests in VisualStudio.
-->
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<session-factory name="NHibernate.Test">
<property name="connection.driver_class">NHibernate.Driver.FirebirdClientDriver</property>
<property name="connection.driver_class">NHibernate.Driver.FirebirdDriver, NHibernate.Driver.Firebird</property>
<property name="connection.connection_string">
DataSource=localhost;
Database=nhibernate;
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate.Config.Templates/MSSQL.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ for your own use before compile tests in VisualStudio.
<!-- This is the System.Data.dll provider for SQL Server -->
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<session-factory name="NHibernate.Test">
<property name="connection.driver_class">NHibernate.Driver.Sql2008ClientDriver</property>
<property name="connection.driver_class">NHibernate.Driver.SqlServer2008Driver, NHibernate.Driver.SqlServer</property>
<property name="connection.connection_string">
Server=(local);initial catalog=nhibernate;Integrated Security=SSPI
</property>
Expand Down
4 changes: 2 additions & 2 deletions src/NHibernate.Config.Templates/MySql.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ for your own use before compile tests in VisualStudio.
-->
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<session-factory name="NHibernate.Test">
<property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
<property name="connection.driver_class">NHibernate.Driver.MySqlDriver, NHibernate.Driver.MySql</property>
<property name="connection.connection_string">
Database=nhibernate;Data Source=localhost;User Id=nhibernate;Password=;
Protocol=memory;Old Guids=True;
</property>
<property name="dialect">NHibernate.Dialect.MySQL5Dialect</property>
</session-factory>
</hibernate-configuration>
</hibernate-configuration>
2 changes: 1 addition & 1 deletion src/NHibernate.Config.Templates/Oracle-Managed.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ for your own use before compile tests in VisualStudio.
<!-- This is the System.Data.OracleClient.dll provider for Oracle from MS -->
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<session-factory name="NHibernate.Test">
<property name="connection.driver_class">NHibernate.Driver.OracleManagedDataClientDriver</property>
<property name="connection.driver_class">NHibernate.Driver.OracleManagedDriver, NHibernate.Driver.Oracle.Managed</property>
<property name="connection.connection_string">
User ID=nhibernate;Password=nhibernate;Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL)))
</property>
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate.Config.Templates/PostgreSQL.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ for your own use before compile tests in VisualStudio.
-->
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<session-factory name="NHibernate.Test">
<property name="connection.driver_class">NHibernate.Driver.NpgsqlDriver</property>
<property name="connection.driver_class">NHibernate.Driver.PostgreSqlDriver, NHibernate.Driver.PostgreSql</property>
<property name="connection.connection_string">
Server=localhost;Database=nhibernate;User ID=nhibernate;Password=nhibernate;Enlist=true;
</property>
Expand Down
2 changes: 1 addition & 1 deletion src/NHibernate.Config.Templates/SQLite.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ for your own use before compile tests in VisualStudio.
-->
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" >
<session-factory name="NHibernate.Test">
<property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property>
<property name="connection.driver_class">NHibernate.Driver.SQLiteDriver, NHibernate.Driver.SQLite</property>
<!-- DateTimeFormatString allows to prevent storing the fact that written date was having kind UTC,
which dodges the undesirable time conversion to local done on reads by System.Data.SQLite.
See https://system.data.sqlite.org/index.html/tktview/44a0955ea344a777ffdbcc077831e1adc8b77a36
Expand Down
Loading