From 61de0a751ac42a2b64c9d29fc085d26a3a3fa194 Mon Sep 17 00:00:00 2001 From: Arastoo Khajehee <64447672+Arastookhajehee@users.noreply.github.com> Date: Fri, 9 Jan 2026 10:26:37 +0900 Subject: [PATCH 1/4] target upgraded to .NetFramework4.8.1 --- src/Machina/Machina.csproj | 2 +- src/Sample Projects/EXAMPLE_ConnectionCheck/App.config | 2 +- .../EXAMPLE_ConnectionCheck/EXAMPLE_ConnectionCheck.csproj | 2 +- src/Sample Projects/EXAMPLE_KeyboardControl/App.config | 2 +- .../EXAMPLE_KeyboardControl/EXAMPLE_KeyboardControl.csproj | 2 +- src/Sample Projects/EXAMPLE_OfflineCodeGeneration/App.config | 2 +- .../EXAMPLE_OfflineCodeGeneration.csproj | 2 +- src/Sample Projects/EXAMPLE_StreamTargets/App.config | 2 +- .../EXAMPLE_StreamTargets/EXAMPLE_StreamTargets.csproj | 2 +- src/Tests/DataTypesTests/DataTypesTests.csproj | 2 +- src/Tests/RobotTests/RobotTests.csproj | 2 +- src/Tests/TEST_NewAPITests/App.config | 2 +- src/Tests/TEST_NewAPITests/TEST_OfflineAPITests.csproj | 2 +- src/Tests/TEST_StreamAPITests/App.config | 2 +- src/Tests/TEST_StreamAPITests/TEST_StreamAPITests.csproj | 2 +- src/Tests/TEST_Workbench/App.config | 2 +- src/Tests/TEST_Workbench/TEST_Workbench.csproj | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Machina/Machina.csproj b/src/Machina/Machina.csproj index 796b0c6..57120ec 100644 --- a/src/Machina/Machina.csproj +++ b/src/Machina/Machina.csproj @@ -9,7 +9,7 @@ Properties Machina Machina - v4.6.1 + v4.8.1 512 diff --git a/src/Sample Projects/EXAMPLE_ConnectionCheck/App.config b/src/Sample Projects/EXAMPLE_ConnectionCheck/App.config index bae5d6d..5ab1a35 100644 --- a/src/Sample Projects/EXAMPLE_ConnectionCheck/App.config +++ b/src/Sample Projects/EXAMPLE_ConnectionCheck/App.config @@ -1,6 +1,6 @@ - + diff --git a/src/Sample Projects/EXAMPLE_ConnectionCheck/EXAMPLE_ConnectionCheck.csproj b/src/Sample Projects/EXAMPLE_ConnectionCheck/EXAMPLE_ConnectionCheck.csproj index b970f7b..202550d 100644 --- a/src/Sample Projects/EXAMPLE_ConnectionCheck/EXAMPLE_ConnectionCheck.csproj +++ b/src/Sample Projects/EXAMPLE_ConnectionCheck/EXAMPLE_ConnectionCheck.csproj @@ -9,7 +9,7 @@ Properties EXAMPLE_ConnectionCheck EXAMPLE_ConnectionCheck - v4.6.1 + v4.8.1 512 true diff --git a/src/Sample Projects/EXAMPLE_KeyboardControl/App.config b/src/Sample Projects/EXAMPLE_KeyboardControl/App.config index bae5d6d..5ab1a35 100644 --- a/src/Sample Projects/EXAMPLE_KeyboardControl/App.config +++ b/src/Sample Projects/EXAMPLE_KeyboardControl/App.config @@ -1,6 +1,6 @@ - + diff --git a/src/Sample Projects/EXAMPLE_KeyboardControl/EXAMPLE_KeyboardControl.csproj b/src/Sample Projects/EXAMPLE_KeyboardControl/EXAMPLE_KeyboardControl.csproj index 70c1275..04ce936 100644 --- a/src/Sample Projects/EXAMPLE_KeyboardControl/EXAMPLE_KeyboardControl.csproj +++ b/src/Sample Projects/EXAMPLE_KeyboardControl/EXAMPLE_KeyboardControl.csproj @@ -9,7 +9,7 @@ Properties EXAMPLE_KeyboardControl EXAMPLE_KeyboardControl - v4.6.1 + v4.8.1 512 true diff --git a/src/Sample Projects/EXAMPLE_OfflineCodeGeneration/App.config b/src/Sample Projects/EXAMPLE_OfflineCodeGeneration/App.config index bae5d6d..5ab1a35 100644 --- a/src/Sample Projects/EXAMPLE_OfflineCodeGeneration/App.config +++ b/src/Sample Projects/EXAMPLE_OfflineCodeGeneration/App.config @@ -1,6 +1,6 @@ - + diff --git a/src/Sample Projects/EXAMPLE_OfflineCodeGeneration/EXAMPLE_OfflineCodeGeneration.csproj b/src/Sample Projects/EXAMPLE_OfflineCodeGeneration/EXAMPLE_OfflineCodeGeneration.csproj index 95d6fe3..c97ab96 100644 --- a/src/Sample Projects/EXAMPLE_OfflineCodeGeneration/EXAMPLE_OfflineCodeGeneration.csproj +++ b/src/Sample Projects/EXAMPLE_OfflineCodeGeneration/EXAMPLE_OfflineCodeGeneration.csproj @@ -9,7 +9,7 @@ Properties EXAMPLE_OfflineCodeGeneration EXAMPLE_OfflineCodeGeneration - v4.6.1 + v4.8.1 512 true diff --git a/src/Sample Projects/EXAMPLE_StreamTargets/App.config b/src/Sample Projects/EXAMPLE_StreamTargets/App.config index bae5d6d..5ab1a35 100644 --- a/src/Sample Projects/EXAMPLE_StreamTargets/App.config +++ b/src/Sample Projects/EXAMPLE_StreamTargets/App.config @@ -1,6 +1,6 @@ - + diff --git a/src/Sample Projects/EXAMPLE_StreamTargets/EXAMPLE_StreamTargets.csproj b/src/Sample Projects/EXAMPLE_StreamTargets/EXAMPLE_StreamTargets.csproj index aa10623..4540927 100644 --- a/src/Sample Projects/EXAMPLE_StreamTargets/EXAMPLE_StreamTargets.csproj +++ b/src/Sample Projects/EXAMPLE_StreamTargets/EXAMPLE_StreamTargets.csproj @@ -9,7 +9,7 @@ Properties EXAMPLE_StreamTargets2 EXAMPLE_StreamTargets2 - v4.6.1 + v4.8.1 512 true diff --git a/src/Tests/DataTypesTests/DataTypesTests.csproj b/src/Tests/DataTypesTests/DataTypesTests.csproj index 2b47e43..28014ae 100644 --- a/src/Tests/DataTypesTests/DataTypesTests.csproj +++ b/src/Tests/DataTypesTests/DataTypesTests.csproj @@ -8,7 +8,7 @@ Properties DataTypesTests DataTypesTests - v4.6.1 + v4.8.1 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10.0 diff --git a/src/Tests/RobotTests/RobotTests.csproj b/src/Tests/RobotTests/RobotTests.csproj index d156bf2..570cf47 100644 --- a/src/Tests/RobotTests/RobotTests.csproj +++ b/src/Tests/RobotTests/RobotTests.csproj @@ -8,7 +8,7 @@ Properties RobotTests RobotTests - v4.6.1 + v4.8.1 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10.0 diff --git a/src/Tests/TEST_NewAPITests/App.config b/src/Tests/TEST_NewAPITests/App.config index bae5d6d..5ab1a35 100644 --- a/src/Tests/TEST_NewAPITests/App.config +++ b/src/Tests/TEST_NewAPITests/App.config @@ -1,6 +1,6 @@ - + diff --git a/src/Tests/TEST_NewAPITests/TEST_OfflineAPITests.csproj b/src/Tests/TEST_NewAPITests/TEST_OfflineAPITests.csproj index 8df8689..c3b729b 100644 --- a/src/Tests/TEST_NewAPITests/TEST_OfflineAPITests.csproj +++ b/src/Tests/TEST_NewAPITests/TEST_OfflineAPITests.csproj @@ -9,7 +9,7 @@ Properties TEST_NewAPITests TEST_NewAPITests - v4.6.1 + v4.8.1 512 true diff --git a/src/Tests/TEST_StreamAPITests/App.config b/src/Tests/TEST_StreamAPITests/App.config index bae5d6d..5ab1a35 100644 --- a/src/Tests/TEST_StreamAPITests/App.config +++ b/src/Tests/TEST_StreamAPITests/App.config @@ -1,6 +1,6 @@ - + diff --git a/src/Tests/TEST_StreamAPITests/TEST_StreamAPITests.csproj b/src/Tests/TEST_StreamAPITests/TEST_StreamAPITests.csproj index cfcf247..3ae0fd1 100644 --- a/src/Tests/TEST_StreamAPITests/TEST_StreamAPITests.csproj +++ b/src/Tests/TEST_StreamAPITests/TEST_StreamAPITests.csproj @@ -9,7 +9,7 @@ Properties TEST_StreamAPITests TEST_StreamAPITests - v4.6.1 + v4.8.1 512 true diff --git a/src/Tests/TEST_Workbench/App.config b/src/Tests/TEST_Workbench/App.config index bae5d6d..5ab1a35 100644 --- a/src/Tests/TEST_Workbench/App.config +++ b/src/Tests/TEST_Workbench/App.config @@ -1,6 +1,6 @@ - + diff --git a/src/Tests/TEST_Workbench/TEST_Workbench.csproj b/src/Tests/TEST_Workbench/TEST_Workbench.csproj index 9e0c840..369928b 100644 --- a/src/Tests/TEST_Workbench/TEST_Workbench.csproj +++ b/src/Tests/TEST_Workbench/TEST_Workbench.csproj @@ -9,7 +9,7 @@ Properties TEST_Workbench TEST_Workbench - v4.6.1 + v4.8.1 512 true From c43e1f1c1f2820fd1f4c0200170ac4110fc423cd Mon Sep 17 00:00:00 2001 From: Arastoo Khajehee <64447672+Arastookhajehee@users.noreply.github.com> Date: Fri, 9 Jan 2026 16:06:52 +0900 Subject: [PATCH 2/4] build successful to .netstandard2.0 --- src/Machina/Machina.csproj | 201 +++---------------- src/Machina/Properties/AssemblyInfo.cs | 23 --- src/Machina/Properties/Resources.Designer.cs | 63 ------ 3 files changed, 27 insertions(+), 260 deletions(-) delete mode 100644 src/Machina/Properties/Resources.Designer.cs diff --git a/src/Machina/Machina.csproj b/src/Machina/Machina.csproj index 57120ec..d049ff2 100644 --- a/src/Machina/Machina.csproj +++ b/src/Machina/Machina.csproj @@ -1,179 +1,40 @@ - - - + - Debug - AnyCPU - {15951838-F9D6-4988-A103-B7C72BFE81A2} + netstandard2.0 Library - Properties - Machina - Machina - v4.8.1 - 512 - - - + + REM JL: for the time being, only copy ddlls manually to avoid breaking the dependent projects +REM IF ($(ConfigurationName)) == (Debug) GOTO END +REM cd $(ProjectDir) +REM copy /y bin\Release\Machina.dll "D:\Dropbox\Jose Luis\code\MachinaDynamo\package\Machina\bin" +REM :END + Machina + Microsoft + Machina + Copyright © Microsoft 2016 + 1.0.0.0 + 1.0.0.0 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt 1 bin\Debug\Machina.xml - pdbonly - true - bin\Release\ - TRACE - prompt - 4 bin\Release\Machina.xml - true bin\x64\Debug\ - DEBUG;TRACE - full - x64 - prompt MinimumRecommendedRules.ruleset bin\x64\Release\ - TRACE - true - pdbonly - x64 - prompt MinimumRecommendedRules.ruleset - - - - - assemblies\ABB.Robotics.Controllers.PC.dll - - - assemblies\RobotStudio.Services.RobApi.Desktop.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - @@ -202,23 +63,15 @@ - - - REM JL: for the time being, only copy ddlls manually to avoid breaking the dependent projects -REM IF ($(ConfigurationName)) == (Debug) GOTO END -REM cd $(ProjectDir) -REM copy /y bin\Release\Machina.dll "D:\Dropbox\Jose Luis\code\MachinaDynamo\package\Machina\bin" -REM :END - - - - - - + + + assemblies\ABB.Robotics.Controllers.PC.dll + + + assemblies\RobotStudio.Services.RobApi.dll + + + assemblies\RobotStudio.Services.RobApi.Desktop.dll + + \ No newline at end of file diff --git a/src/Machina/Properties/AssemblyInfo.cs b/src/Machina/Properties/AssemblyInfo.cs index 00039fb..d6baf7b 100644 --- a/src/Machina/Properties/AssemblyInfo.cs +++ b/src/Machina/Properties/AssemblyInfo.cs @@ -1,16 +1,6 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Machina")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Machina")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -21,16 +11,3 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("12d4098e-2f9e-4e15-892b-fded71da4b47")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Machina/Properties/Resources.Designer.cs b/src/Machina/Properties/Resources.Designer.cs deleted file mode 100644 index 7e180c9..0000000 --- a/src/Machina/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Machina.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Machina.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} From b5f0cc4a9e8d6e2cdaa54e2d2c6ffa284e39102b Mon Sep 17 00:00:00 2001 From: Arastoo Khajehee <64447672+Arastookhajehee@users.noreply.github.com> Date: Sun, 11 Jan 2026 14:18:45 +0900 Subject: [PATCH 3/4] added Newtonsoft.Json helper function --- src/Machina/Machina.csproj | 1 + src/Machina/Utilities/Conversion.cs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/Machina/Machina.csproj b/src/Machina/Machina.csproj index d049ff2..ea8a9d9 100644 --- a/src/Machina/Machina.csproj +++ b/src/Machina/Machina.csproj @@ -32,6 +32,7 @@ REM :END + diff --git a/src/Machina/Utilities/Conversion.cs b/src/Machina/Utilities/Conversion.cs index 834fe8c..77317a7 100644 --- a/src/Machina/Utilities/Conversion.cs +++ b/src/Machina/Utilities/Conversion.cs @@ -1,5 +1,7 @@ using System; using Machina.Types.Geometry; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; // ██╗ ██╗████████╗██╗██╗ ██╗████████╗██╗███████╗███████╗ // ██║ ██║╚══██╔══╝██║██║ ██║╚══██╔══╝██║██╔════╝██╔════╝ @@ -132,6 +134,20 @@ public static int[] ByteArrayToInt32Array(byte[] bytes, int byteCount = 0, bool return d; } + public static double?[] ToNullableDoubles(JToken token) + { + if (token == null || token.Type == JTokenType.Null) + return null; + + if (token.Type == JTokenType.Array) + { + // Convert JArray → object[] → existing Machina utility + object[] objs = token.ToObject(); + return Machina.Utilities.Conversion.NullableDoublesFromObjects(objs); + } + + throw new JsonException("Expected array or null, got " + token.Type); + } /// /// Quick conversion for wobjs, but totally dislike this here. Mmmm... From 18ae383659a0267c0e8ccaa0a916d5cd9c0ed828 Mon Sep 17 00:00:00 2001 From: Arastoo Khajehee <64447672+Arastookhajehee@users.noreply.github.com> Date: Sun, 11 Jan 2026 14:22:08 +0900 Subject: [PATCH 4/4] added description for the new helper function. --- src/Machina/Utilities/Conversion.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Machina/Utilities/Conversion.cs b/src/Machina/Utilities/Conversion.cs index 77317a7..9df955d 100644 --- a/src/Machina/Utilities/Conversion.cs +++ b/src/Machina/Utilities/Conversion.cs @@ -134,6 +134,12 @@ public static int[] ByteArrayToInt32Array(byte[] bytes, int byteCount = 0, bool return d; } + /// + /// Takes a Newtonsoft.Json JToken and converts it into an array of nullable doubles. + /// This is replacement for the NullableDoublesFromObjects function in .NetStandard and above. + /// + /// + /// public static double?[] ToNullableDoubles(JToken token) { if (token == null || token.Type == JTokenType.Null)