diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ba7e853..d96eaa6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -63,9 +63,7 @@ jobs:
- name: Run unit tests windows
if: matrix.os == 'windows-latest'
- env:
- RuntimeIdentifier: win
- run: dotnet test -c ${{ env.configuration }}
+ run: dotnet test -c ${{ env.configuration }} -p:WChartTarget=win
working-directory: './src'
- name: Build solution
diff --git a/src/WCharT.Net.Tests/WCharT.Net.Tests.csproj b/src/WCharT.Net.Tests/WCharT.Net.Tests.csproj
index fcc3e27..e7653c6 100644
--- a/src/WCharT.Net.Tests/WCharT.Net.Tests.csproj
+++ b/src/WCharT.Net.Tests/WCharT.Net.Tests.csproj
@@ -3,6 +3,11 @@
false
true
WCharT.Tests
+
+
+ Exe
+ true
+ true
diff --git a/src/WCharT.Net/WCharT.Net.csproj b/src/WCharT.Net/WCharT.Net.csproj
index 4e72dd6..6841067 100644
--- a/src/WCharT.Net/WCharT.Net.csproj
+++ b/src/WCharT.Net/WCharT.Net.csproj
@@ -21,7 +21,7 @@
WCharT
true
- $(DefineConstants);TARGET_WINDOWS
+ $(DefineConstants);TARGET_WINDOWS
true
false
@@ -35,16 +35,28 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/WCharT.slnx b/src/WCharT.slnx
index bdc238c..a89918c 100644
--- a/src/WCharT.slnx
+++ b/src/WCharT.slnx
@@ -7,6 +7,7 @@
+
diff --git a/src/build.fsx b/src/build.fsx
index 7d540b1..d3fafe1 100644
--- a/src/build.fsx
+++ b/src/build.fsx
@@ -1,26 +1,24 @@
#r "nuget: SimpleExec, 12.0.0"
-open System
open SimpleExec
let wchartDir = System.IO.Path.Combine(System.IO.Directory.GetCurrentDirectory(), "WCharT.Net")
-//Create binary for Linux / Mac
-Command.Run(
- name = "dotnet",
- args = "build --runtime unix --configuration Release",
- workingDirectory = wchartDir
-)
+let configuration = "Release"
-//Create binary for Windows
-Command.Run(
- name = "dotnet",
- args = "build --runtime win --configuration Release",
- workingDirectory = wchartDir
-)
+let buildVariant (target: string) =
+ Command.Run(
+ name = "dotnet",
+ args = $"build -c {configuration} -p:WChartTarget={target} --artifacts-path ../artifacts/bin/{target}/",
+ workingDirectory = wchartDir
+ )
//Create reference assembly for AnyCPU
Command.Run(
name = "dotnet",
- args = "build --configuration Release",
+ args = $"build -c {configuration} --artifacts-path ../artifacts/ref/",
workingDirectory = wchartDir
-)
\ No newline at end of file
+)
+
+//Create platform-specific binaries
+buildVariant "unix"
+buildVariant "win"
\ No newline at end of file
diff --git a/src/global.json b/src/global.json
new file mode 100644
index 0000000..802ab21
--- /dev/null
+++ b/src/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}
\ No newline at end of file