diff --git a/ReleaseProcedure.txt b/ReleaseProcedure.txt
index 753cce5c66a..82ebcc510db 100644
--- a/ReleaseProcedure.txt
+++ b/ReleaseProcedure.txt
@@ -4,11 +4,11 @@ These are the tasks typically needed to create an official NHibernate release.
that is about to happen (as these will show in the milestone).
* Create a draft release in Github with GitReleaseManager. If you have used
- the NHibernate build menu, it should be available in Tools\gitreleasemanage.x.x.x\
+ the NHibernate build menu, it should be available in Tools\gitreleasemanager\x.x.x\
(change x.x.x by its current version in tools).
By example:
-Tools\gitreleasemanager.0.7.0\tools\GitReleaseManager.exe create -o nhibernate -r nhibernate-core -m 5.1 -u username -p password
+Tools\gitreleasemanager\0.7.0\tools\GitReleaseManager.exe create -o nhibernate -r nhibernate-core -m 5.1 -u username -p password
(Adjust the -m milestone parameter above, and add "-c branchname" if
releasing another branch than master)
diff --git a/ShowBuildMenu.bat b/ShowBuildMenu.bat
index 9e4dd3d18a6..4bbb640c761 100644
--- a/ShowBuildMenu.bat
+++ b/ShowBuildMenu.bat
@@ -1,12 +1,16 @@
@echo off
pushd %~dp0
+for /f "tokens=* USEBACKQ delims= " %%i in (`findstr /c:"NUnit.Console" "Tools\packages.csproj"`) do set NUNIT_VERSION=%%i
+set NUNIT_VERSION=%NUNIT_VERSION:~51%
+set NUNIT_VERSION=%NUNIT_VERSION:" />=%
+
set NANT="%~dp0Tools\nant\bin\NAnt.exe" -t:net-4.0
set BUILD_TOOL_PATH=%~dp0Tools\BuildTool\bin\BuildTool.dll
set BUILDTOOL=dotnet %BUILD_TOOL_PATH%
set AVAILABLE_CONFIGURATIONS=%~dp0available-test-configurations
set CURRENT_CONFIGURATION=%~dp0current-test-configuration
-set NUNIT="%~dp0Tools\NUnit.ConsoleRunner.3.10.0\tools\nunit3-console.exe"
+set NUNIT="%~dp0Tools\NUnit.ConsoleRunner\%NUNIT_VERSION%\tools\nunit3-console.exe"
if not exist %BUILD_TOOL_PATH% (
pushd %~dp0Tools\BuildTool
@@ -184,6 +188,7 @@ SET NUNITPLATFORM=
goto test-run
:test-run
+%NANT% common.tools-restore
start "nunit3-console" cmd /K %NUNIT% %NUNITPLATFORM% --agents=1 NHibernate.nunit
goto main-menu
diff --git a/ShowBuildMenu.sh b/ShowBuildMenu.sh
index b3e00d4c37a..9d98d5473c8 100755
--- a/ShowBuildMenu.sh
+++ b/ShowBuildMenu.sh
@@ -12,6 +12,7 @@ LIB_FILES2=""
CURRENT_CONFIGURATION="./current-test-configuration"
OPTION=0
async_generator_path=""
+async_generator_version=""
if [ ! -f $BUILD_TOOL_PATH ]
then
@@ -177,11 +178,11 @@ testRun(){
}
generateAsync(){
- dotnet msbuild /t:Restore ./src/NHibernate.sln
+ dotnet restore ./src/NHibernate.sln
getAsyncGeneratorPath
cd src
- mono ../"$async_generator_path"
+ dotnet ../"$async_generator_path"
cd ..
mainMenu
@@ -195,27 +196,15 @@ getAsyncGeneratorPath(){
cd Tools
- if [ ! -f nuget.exe ]
- then
- wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
- fi
-
- async_generator_path="CSharpAsyncGenerator.CommandLine.$(cat packages.config | grep id=\"CSharpAsyncGenerator.CommandLine | cut -d\" -f4)/tools"
+ async_generator_version="$(cat packages.csproj | grep Include=\"CSharpAsyncGenerator.CommandLine | cut -d\" -f4)"
+ async_generator_path="csharpasyncgenerator.commandline/$async_generator_version/tools"
if [ ! -d $async_generator_path ]
then
- mono nuget.exe install
+ dotnet restore "./packages.csproj" --packages .
fi
- if [ ! -f $async_generator_path/SQLitePCLRaw.core.dll ]
- then
- # This "hidden" dependency causes a failure under some Mono setup, add it explicitly
- mono nuget.exe install SQLitePCLRaw.core -Version 1.0.0
- cp SQLitePCLRaw.core.1.0.0/lib/net45/SQLitePCLRaw.core.dll $async_generator_path/
- fi
-
- async_generator_path="Tools/$async_generator_path/AsyncGenerator.CommandLine.exe"
-
+ async_generator_path="Tools/$async_generator_path/netcoreapp2.1/AsyncGenerator.CommandLine.dll"
cd ..
}
diff --git a/Tools/.gitignore b/Tools/.gitignore
index 1128a77fed4..f57f34e8809 100644
--- a/Tools/.gitignore
+++ b/Tools/.gitignore
@@ -1,6 +1,7 @@
nuget.exe
-NUnit.*
-vswhere.*
-CSharpAsyncGenerator.CommandLine.*
-gitreleasemanager.*
-SQLitePCLRaw.core.*
+nunit.*
+vswhere/
+csharpasyncgenerator.commandline/
+gitreleasemanager/
+obj/
+microsoft.*
diff --git a/Tools/actual_msbuild.cmd b/Tools/actual_msbuild.cmd
index 7db65390fe3..7596a39ba5b 100644
--- a/Tools/actual_msbuild.cmd
+++ b/Tools/actual_msbuild.cmd
@@ -1,6 +1,6 @@
@echo off
-for /f "usebackq tokens=*" %%i in (`%~dp0\vswhere.2.1.4\tools\vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
+for /f "usebackq tokens=*" %%i in (`%~dp0\vswhere\2.1.4\tools\vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
set InstallDir=%%i
)
diff --git a/Tools/packages.config b/Tools/packages.config
deleted file mode 100644
index d58f2d2e51b..00000000000
--- a/Tools/packages.config
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/Tools/packages.csproj b/Tools/packages.csproj
new file mode 100644
index 00000000000..23590a90970
--- /dev/null
+++ b/Tools/packages.csproj
@@ -0,0 +1,20 @@
+
+
+
+ netcoreapp2.1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build-common/common.xml b/build-common/common.xml
index 26e5302a66d..70c8c685303 100644
--- a/build-common/common.xml
+++ b/build-common/common.xml
@@ -39,10 +39,10 @@
/>
-
-
-
-
+
+
+
+
diff --git a/default.build b/default.build
index 51399f2fc4c..a65ecd04d78 100644
--- a/default.build
+++ b/default.build
@@ -46,7 +46,7 @@
-
+
@@ -54,24 +54,24 @@
-
+
-
+ file="${tools.dir}/packages.csproj"
+ xpath="/Project/ItemGroup/PackageReference[@Include = '${tool.id}']/@Version"
+ property="tool.version" />
+
-
-
-
+
+
+
-
-
+
+
+
+
@@ -150,9 +150,9 @@
-
-
-
+
+
+
diff --git a/doc/documentation.build b/doc/documentation.build
index 86104ac767b..52cf503cd6d 100644
--- a/doc/documentation.build
+++ b/doc/documentation.build
@@ -9,7 +9,7 @@
-
+
diff --git a/src/AsyncGenerator.yml b/src/AsyncGenerator.yml
index a4d096948b0..6dbd545a149 100644
--- a/src/AsyncGenerator.yml
+++ b/src/AsyncGenerator.yml
@@ -1,8 +1,10 @@
projects:
- filePath: NHibernate/NHibernate.csproj
- targetFramework: net461
+ targetFramework: netcoreapp2.0
concurrentRun: true
applyChanges: true
+ suppressDiagnosticFailures:
+ - pattern: ^.*(Hql\.g).*$
analyzation:
methodConversion:
- conversion: Ignore
@@ -166,17 +168,21 @@
- type: AsyncGenerator.Core.Plugins.EmptyRegionRemover
assemblyName: AsyncGenerator.Core
- filePath: NHibernate.DomainModel/NHibernate.DomainModel.csproj
- targetFramework: net461
+ targetFramework: netcoreapp2.0
concurrentRun: true
applyChanges: true
+ suppressDiagnosticFailures:
+ - pattern: ^.*(Hql\.g).*$
analyzation:
scanMethodBody: true
scanForMissingAsyncMembers:
- all: true
- filePath: NHibernate.Test/NHibernate.Test.csproj
- targetFramework: net461
+ targetFramework: netcoreapp2.0
concurrentRun: true
applyChanges: true
+ suppressDiagnosticFailures:
+ - pattern: ^.*(Hql\.g).*$
analyzation:
methodConversion:
- conversion: Copy
@@ -198,6 +204,7 @@
rule: IsTestCase
- conversion: Ignore
anyBaseTypeRule: IsTestCase
+ executionPhase: PostProviders
ignoreDocuments:
- filePathEndsWith: Linq/MathTests.cs
- filePathEndsWith: Linq/ExpressionSessionLeakTest.cs
diff --git a/src/NHibernate.Test/Ado/BatcherFixture.cs b/src/NHibernate.Test/Ado/BatcherFixture.cs
index e9f80c182b7..16574a18e0d 100644
--- a/src/NHibernate.Test/Ado/BatcherFixture.cs
+++ b/src/NHibernate.Test/Ado/BatcherFixture.cs
@@ -90,13 +90,14 @@ public void OneRoundTripUpdate()
Cleanup();
}
-#if NETFX
- [Test, Ignore("Not fixed yet.")]
+ [Test, Ignore("Not fixed yet."), NetFxOnly]
[Description("SqlClient: The batcher should run all different INSERT queries in only one roundtrip.")]
public void SqlClientOneRoundTripForUpdateAndInsert()
{
+#if NETFX
if (Sfi.Settings.BatcherFactory is SqlClientBatchingBatcherFactory == false)
Assert.Ignore("This test is for SqlClientBatchingBatcher only");
+#endif
FillDb();
@@ -129,12 +130,14 @@ public void SqlClientOneRoundTripForUpdateAndInsert()
Cleanup();
}
- [Test]
+ [Test, NetFxOnly]
[Description("SqlClient: The batcher log output should be formatted")]
public void BatchedoutputShouldBeFormatted()
{
+#if NETFX
if (Sfi.Settings.BatcherFactory is SqlClientBatchingBatcherFactory == false)
Assert.Ignore("This test is for SqlClientBatchingBatcher only");
+#endif
using (var sqlLog = new SqlLogSpy())
{
@@ -145,7 +148,6 @@ public void BatchedoutputShouldBeFormatted()
Cleanup();
}
-#endif
[Test]
[Description("The batcher should run all DELETE queries in only one roundtrip.")]
diff --git a/src/NHibernate.Test/Async/Ado/BatcherFixture.cs b/src/NHibernate.Test/Async/Ado/BatcherFixture.cs
index a21e4c918e0..de08b5410d3 100644
--- a/src/NHibernate.Test/Async/Ado/BatcherFixture.cs
+++ b/src/NHibernate.Test/Async/Ado/BatcherFixture.cs
@@ -102,14 +102,14 @@ public async Task OneRoundTripUpdateAsync()
await (CleanupAsync());
}
- #if NETFX
-
- [Test]
+ [Test, NetFxOnly]
[Description("SqlClient: The batcher log output should be formatted")]
public async Task BatchedoutputShouldBeFormattedAsync()
{
+#if NETFX
if (Sfi.Settings.BatcherFactory is SqlClientBatchingBatcherFactory == false)
Assert.Ignore("This test is for SqlClientBatchingBatcher only");
+#endif
using (var sqlLog = new SqlLogSpy())
{
@@ -120,7 +120,6 @@ public async Task BatchedoutputShouldBeFormattedAsync()
await (CleanupAsync());
}
-#endif
[Test]
[Description("The batcher should run all DELETE queries in only one roundtrip.")]
diff --git a/src/NHibernate.Test/Async/NHSpecificTest/GH1547/Fixture.cs b/src/NHibernate.Test/Async/NHSpecificTest/GH1547/Fixture.cs
index f55778a975f..a9b6818c04f 100644
--- a/src/NHibernate.Test/Async/NHSpecificTest/GH1547/Fixture.cs
+++ b/src/NHibernate.Test/Async/NHSpecificTest/GH1547/Fixture.cs
@@ -103,12 +103,12 @@ public async Task LinqWithListParameterPerfAsync()
{
var query = queryFactory(session);
// Warm up.
- await (RunBenchmarkUnitAsync(cache, query));
+ await (RunBenchmarkUnitAsync(cache, query, cancellationToken));
for (var j = 0; j < 1000; j++)
{
sw.Restart();
- await (RunBenchmarkUnitAsync(cache, query));
+ await (RunBenchmarkUnitAsync(cache, query, cancellationToken));
sw.Stop();
timings.Add(sw.Elapsed.TotalMilliseconds);
}
@@ -122,7 +122,7 @@ public async Task LinqWithListParameterPerfAsync()
$"{test} average time: {avg}ms (s {Math.Sqrt(timings.Sum(t => Math.Pow(t - avg, 2)) / (timings.Count - 1))}ms)");
}
- private static Task RunBenchmarkUnitAsync(SoftLimitMRUCache cache, IQueryable query)
+ private static Task RunBenchmarkUnitAsync(SoftLimitMRUCache cache, IQueryable query, CancellationToken cancellationToken = default(CancellationToken))
{
try
{
diff --git a/src/NHibernate.Test/Async/NHSpecificTest/NH2898/BinaryFormatterCache.cs b/src/NHibernate.Test/Async/NHSpecificTest/NH2898/BinaryFormatterCache.cs
index 5fbc3ca0ef7..ef42a49d254 100644
--- a/src/NHibernate.Test/Async/NHSpecificTest/NH2898/BinaryFormatterCache.cs
+++ b/src/NHibernate.Test/Async/NHSpecificTest/NH2898/BinaryFormatterCache.cs
@@ -34,7 +34,7 @@ public override Task