From 146c992dd52e776421a9266de138863bb419aefa Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 27 Oct 2019 13:31:50 +0100 Subject: [PATCH] Change c# projects to dotnet framework version 4.5 due to dependencies not being available for newer versions --- src/ZoneCodeGenerator.lua | 1 + src/ZoneCodeGenerator/Utils/KeyValueExtension.cs | 9 ++++++++- test/ZoneCodeGeneratorTests.lua | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ZoneCodeGenerator.lua b/src/ZoneCodeGenerator.lua index fd8b7cbf..6b35fd9d 100644 --- a/src/ZoneCodeGenerator.lua +++ b/src/ZoneCodeGenerator.lua @@ -20,6 +20,7 @@ function ZoneCodeGenerator:project() location "%{wks.location}/src/%{prj.name}" kind "ConsoleApp" language "C#" + dotnetframework "4.5" namespace "ZoneCodeGenerator" files { diff --git a/src/ZoneCodeGenerator/Utils/KeyValueExtension.cs b/src/ZoneCodeGenerator/Utils/KeyValueExtension.cs index 8f05d826..7d875de1 100644 --- a/src/ZoneCodeGenerator/Utils/KeyValueExtension.cs +++ b/src/ZoneCodeGenerator/Utils/KeyValueExtension.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; namespace ZoneCodeGenerator.Utils { @@ -9,5 +10,11 @@ namespace ZoneCodeGenerator.Utils m1 = keyValuePair.Key; m2 = keyValuePair.Value; } + + public static void Deconstruct(this Tuple keyValuePair, out T1 m1, out T2 m2) + { + m1 = keyValuePair.Item1; + m2 = keyValuePair.Item2; + } } } diff --git a/test/ZoneCodeGeneratorTests.lua b/test/ZoneCodeGeneratorTests.lua index 839faefc..46f734d1 100644 --- a/test/ZoneCodeGeneratorTests.lua +++ b/test/ZoneCodeGeneratorTests.lua @@ -20,6 +20,7 @@ function ZoneCodeGeneratorTests:project() location "%{wks.location}/test/%{prj.name}" kind "SharedLib" language "C#" + dotnetframework "4.5" files { path.join(folder, "ZoneCodeGeneratorTests/**.cs")