diff --git a/build.gradle b/build.gradle
index 9a497e90fb..9a569fc674 100644
--- a/build.gradle
+++ b/build.gradle
@@ -308,6 +308,7 @@ project(':sbe-tool') {
implementation "org.json:json:${jsonVersion}"
}
+
targets {
all {
testTask.configure {
@@ -315,6 +316,8 @@ project(':sbe-tool') {
maxHeapSize = '2g'
javaLauncher.set(toolchainLauncher)
+
+ systemProperty 'sbe.dll', "${rootProject.projectDir}/csharp/sbe-dll/bin/Release/netstandard2.0/SBE.dll"
}
}
}
diff --git a/csharp/sbe-dll/sbe-dll.csproj b/csharp/sbe-dll/sbe-dll.csproj
index 1d9d075a87..796ee9d237 100644
--- a/csharp/sbe-dll/sbe-dll.csproj
+++ b/csharp/sbe-dll/sbe-dll.csproj
@@ -37,10 +37,6 @@
-
-
-
-
diff --git a/sbe-tool/src/propertyTest/java/uk/co/real_logic/sbe/properties/DtosPropertyTest.java b/sbe-tool/src/propertyTest/java/uk/co/real_logic/sbe/properties/DtosPropertyTest.java
index d68a1c327c..8adc57679d 100644
--- a/sbe-tool/src/propertyTest/java/uk/co/real_logic/sbe/properties/DtosPropertyTest.java
+++ b/sbe-tool/src/propertyTest/java/uk/co/real_logic/sbe/properties/DtosPropertyTest.java
@@ -39,6 +39,8 @@
public class DtosPropertyTest
{
private static final String DOTNET_EXECUTABLE = System.getProperty("sbe.tests.dotnet.executable", "dotnet");
+ private static final String SBE_DLL =
+ System.getProperty("sbe.dll", "csharp/sbe-dll/bin/Release/netstandard2.0/SBE.dll");
private static final String CPP_EXECUTABLE = System.getProperty("sbe.tests.cpp.executable", "g++");
private static final boolean KEEP_DIR_ON_FAILURE = Boolean.parseBoolean(
System.getProperty("sbe.tests.keep.dir.on.failure", "true"));
@@ -80,7 +82,9 @@ void csharpDtoEncodeShouldBeTheInverseOfDtoDecode(
writeInputFile(encodedMessage, tempDir);
execute(encodedMessage.schema(), tempDir, "test",
- DOTNET_EXECUTABLE, "run", "--", "input.dat");
+ DOTNET_EXECUTABLE, "run",
+ "--property:SBE_DLL=" + SBE_DLL,
+ "--", "input.dat");
final byte[] inputBytes = new byte[encodedMessage.length()];
encodedMessage.buffer().getBytes(0, inputBytes);
@@ -211,12 +215,12 @@ private static void execute(
{
final Path stdout = tempDir.resolve(name + "_stdout.txt");
final Path stderr = tempDir.resolve(name + "_stderr.txt");
- final ProcessBuilder compileProcessBuilder = new ProcessBuilder(args)
+ final ProcessBuilder processBuilder = new ProcessBuilder(args)
.directory(tempDir.toFile())
.redirectOutput(stdout.toFile())
.redirectError(stderr.toFile());
- final Process process = compileProcessBuilder.start();
+ final Process process = processBuilder.start();
if (0 != process.waitFor())
{
diff --git a/sbe-tool/src/propertyTest/resources/CSharpDtosPropertyTest/SbePropertyTest.csproj b/sbe-tool/src/propertyTest/resources/CSharpDtosPropertyTest/SbePropertyTest.csproj
index 8b0b167d2b..5da3f76095 100644
--- a/sbe-tool/src/propertyTest/resources/CSharpDtosPropertyTest/SbePropertyTest.csproj
+++ b/sbe-tool/src/propertyTest/resources/CSharpDtosPropertyTest/SbePropertyTest.csproj
@@ -7,7 +7,7 @@
- /home/zach/src/real-logic/simple-binary-encoding/csharp/sbe-dll/bin/Release/netstandard2.0/SBE.dll
+ $(SBE_DLL)