Skip to content

Commit e948759

Browse files
committed
Add .NET Core 2.0 and .NET Standard 2.0 builds
1 parent c90b08c commit e948759

File tree

80 files changed

+469
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+469
-193
lines changed

Tools/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net461" />
88
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.2" targetFramework="net461" />
99
<package id="NUnit.Extension.VSProjectLoader" version="3.6.0" targetFramework="net461" />
10-
<package id="CSharpAsyncGenerator.CommandLine" version="0.8.1" targetFramework="net461" />
10+
<package id="CSharpAsyncGenerator.CommandLine" version="0.8.2" targetFramework="net461" />
1111
<package id="vswhere" version="2.1.4" targetFramework="net461" />
1212
</packages>

build-common/NHibernate.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@
2424

2525
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
2626
<TreatSpecificWarningsAsErrors />
27+
28+
<DisableImplicitPackageTargetFallback>True</DisableImplicitPackageTargetFallback>
2729
</PropertyGroup>
2830
</Project>

default.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<exec program="dotnet" verbose="true">
3434
<arg value="msbuild" />
3535
<arg value="${root.dir}/src/NHibernate.sln" />
36+
<arg value="/p:TargetFramework=&quot;net461&quot;" />
3637
<arg value="/p:OutputPath=&quot;${path::get-full-path(bin.dir)}&quot;" />
3738
<arg value="/p:Platform=&quot;Any CPU&quot;" />
3839
<arg value="/p:Configuration=&quot;Debug&quot;" if="${project.config == 'debug'}" />

src/NHibernate.DomainModel/NHibernate.DomainModel.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="../../build-common/NHibernate.props" />
33
<PropertyGroup>
44
<Description>The Domain Model used by the Unit Tests.</Description>
5-
<TargetFramework>net461</TargetFramework>
5+
<TargetFrameworks>netstandard2.0;net461;netcoreapp2.0</TargetFrameworks>
66
<IsTestProject>true</IsTestProject>
77
<NoWarn>$(NoWarn);3001;3002;3003;3005</NoWarn>
88
</PropertyGroup>

src/NHibernate.Test.VisualBasic/NHibernate.Test.VisualBasic.vbproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="../../build-common/NHibernate.props" />
33
<PropertyGroup>
44
<Description>The Visual Basic Unit Tests for NHibernate.</Description>
5-
<TargetFramework>net461</TargetFramework>
5+
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
66
<IsTestProject>true</IsTestProject>
77
<NoWarn>$(NoWarn);3001;3002;3003;3005</NoWarn>
88
<OptionExplicit>On</OptionExplicit>
@@ -11,6 +11,9 @@
1111
<ItemGroup>
1212
<None Remove="**\*.hbm.xml" />
1313
</ItemGroup>
14+
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp2.0'">
15+
<Compile Remove="**\Issues\NH3302\**" />
16+
</ItemGroup>
1417
<ItemGroup>
1518
<EmbeddedResource Include="**\*.hbm.xml" Exclude="bin\**\*.*" />
1619
</ItemGroup>

src/NHibernate.Test/Ado/BatcherFixture.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public void OneRoundTripUpdate()
8686
Cleanup();
8787
}
8888

89+
#if NET461
8990
[Test, Ignore("Not fixed yet.")]
9091
[Description("SqlClient: The batcher should run all different INSERT queries in only one roundtrip.")]
9192
public void SqlClientOneRoundTripForUpdateAndInsert()
@@ -95,7 +96,7 @@ public void SqlClientOneRoundTripForUpdateAndInsert()
9596

9697
FillDb();
9798

98-
using(var sqlLog = new SqlLogSpy())
99+
using (var sqlLog = new SqlLogSpy())
99100
using (ISession s = Sfi.OpenSession())
100101
using (ITransaction tx = s.BeginTransaction())
101102
{
@@ -140,7 +141,7 @@ public void BatchedoutputShouldBeFormatted()
140141

141142
Cleanup();
142143
}
143-
144+
#endif
144145

145146
[Test]
146147
[Description("The batcher should run all DELETE queries in only one roundtrip.")]

src/NHibernate.Test/App.config

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@
3131
<property name="dialect">NHibernate.Dialect.MsSql2008Dialect</property>
3232

3333
<property name="connection.driver_class">NHibernate.Driver.Sql2008ClientDriver</property> <!-- Shouldn't be necessary, but is required by some tests -->
34-
<property name="connection.connection_string_name">TestConnectionString</property>
34+
<property name="connection.connection_string">Server=localhost\sqlexpress;Database=nhibernate;Integrated Security=SSPI</property>
3535
<property name="connection.provider">NHibernate.Test.DebugConnectionProvider, NHibernate.Test</property>
3636
<property name="connection.isolation">ReadCommitted</property> <!-- See System.Data.IsolationLevel for valid values -->
37-
<!--property name="connection.connection_string" /-->
3837

3938
<property name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider, NHibernate</property>
4039
<property name="cache.use_query_cache">true</property>
@@ -53,7 +52,7 @@
5352
</session-factory>
5453
</hibernate-configuration>
5554

56-
<log4net debug="false">
55+
<log4net debug="false">
5756

5857
<!-- Appenders -->
5958
<appender name="trace" type="log4net.Appender.TraceAppender, log4net">

src/NHibernate.Test/Async/Ado/BatcherFixture.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public async Task OneRoundTripUpdateAsync()
9898
await (CleanupAsync());
9999
}
100100

101+
#if NET461
101102
[Test, Ignore("Not fixed yet.")]
102103
[Description("SqlClient: The batcher should run all different INSERT queries in only one roundtrip.")]
103104
public async Task SqlClientOneRoundTripForUpdateAndInsertAsync()
@@ -107,7 +108,7 @@ public async Task SqlClientOneRoundTripForUpdateAndInsertAsync()
107108

108109
await (FillDbAsync());
109110

110-
using(var sqlLog = new SqlLogSpy())
111+
using (var sqlLog = new SqlLogSpy())
111112
using (ISession s = Sfi.OpenSession())
112113
using (ITransaction tx = s.BeginTransaction())
113114
{
@@ -152,7 +153,7 @@ public async Task BatchedoutputShouldBeFormattedAsync()
152153

153154
await (CleanupAsync());
154155
}
155-
156+
#endif
156157

157158
[Test]
158159
[Description("The batcher should run all DELETE queries in only one roundtrip.")]

src/NHibernate.Test/Async/CfgTest/ConfigurationSerializationTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public class ConfigurationSerializationTestsAsync
2828
[Test]
2929
public async Task Basic_CRUD_should_workAsync()
3030
{
31+
Assume.That(typeof(System.Type).IsSerializable);
32+
3133
Assembly assembly = Assembly.Load("NHibernate.DomainModel");
3234
var cfg = new Configuration();
3335
if (TestConfigurationHelper.hibernateConfigFile != null)

src/NHibernate.Test/Async/ConnectionStringTest/NamedConnectionStringFixture.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using System;
1212
using System.Collections.Generic;
1313
using System.Data.Common;
14+
using System.Reflection;
1415
using NHibernate.Connection;
1516
using NUnit.Framework;
1617
using Environment=NHibernate.Cfg.Environment;

0 commit comments

Comments
 (0)