From edbf22a35f61a177fd09bae1728e5d68a579709f Mon Sep 17 00:00:00 2001 From: Lars Elgtvedt Susaas Date: Sun, 10 Nov 2024 12:03:41 +0100 Subject: [PATCH 1/3] changed project files --- EDSEditorGUI/EDSEditorGUI.csproj | 8 ++++---- EDSSharp/EDSSharp.csproj | 4 ++-- Tests/Tests.csproj | 4 ++-- libEDSsharp/libEDSsharp.csproj | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/EDSEditorGUI/EDSEditorGUI.csproj b/EDSEditorGUI/EDSEditorGUI.csproj index 603a3e01..9dde5d88 100644 --- a/EDSEditorGUI/EDSEditorGUI.csproj +++ b/EDSEditorGUI/EDSEditorGUI.csproj @@ -1,8 +1,8 @@ net481 - net6.0-windows - net481;net6.0-windows + net8.0-windows + net481;net8.0-windows WinExe ODEditor EDSEditor @@ -99,8 +99,8 @@ - - + + diff --git a/EDSSharp/EDSSharp.csproj b/EDSSharp/EDSSharp.csproj index 948888fe..212ea344 100644 --- a/EDSSharp/EDSSharp.csproj +++ b/EDSSharp/EDSSharp.csproj @@ -1,8 +1,8 @@ net481 - net6.0 - net481;net6.0 + net8.0 + net481;net8.0 Exe false diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 02f77340..5fa46514 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -1,8 +1,8 @@ net481 - net6.0 - net481;net6.0 + net8.0 + net481;net8.0 Library false diff --git a/libEDSsharp/libEDSsharp.csproj b/libEDSsharp/libEDSsharp.csproj index 767f8e79..9d9c6f37 100644 --- a/libEDSsharp/libEDSsharp.csproj +++ b/libEDSsharp/libEDSsharp.csproj @@ -1,8 +1,8 @@  net481 - net6.0 - net481;net6.0 + net8.0 + net481;net8.0 Library true @@ -44,7 +44,7 @@ - + From 909607ab6377ce81403203a762eafde499dc8cdc Mon Sep 17 00:00:00 2001 From: Lars Elgtvedt Susaas Date: Sun, 10 Nov 2024 12:04:12 +0100 Subject: [PATCH 2/3] fixed use of .net8 reserved names --- libEDSsharp/CanOpenXDD_1_1.cs | 8 ++++---- libEDSsharp/CanOpenXSD_1_0.cs | 6 +++--- libEDSsharp/CanOpenXSD_1_1.cs | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libEDSsharp/CanOpenXDD_1_1.cs b/libEDSsharp/CanOpenXDD_1_1.cs index d05840b2..248e84ff 100644 --- a/libEDSsharp/CanOpenXDD_1_1.cs +++ b/libEDSsharp/CanOpenXDD_1_1.cs @@ -229,11 +229,11 @@ public EDSsharp ReadProtobuf(string file, bool json) { var parserConfig = new JsonParser.Settings(100); var parser = new JsonParser(parserConfig); - devCanOpen = parser.Parse(File.ReadAllText(file)); + devCanOpen = parser.Parse(System.IO.File.ReadAllText(file)); } else { - using (var input = File.OpenRead(file)) + using (var input = System.IO.File.OpenRead(file)) { devCanOpen = CanOpenDevice.Parser.ParseFrom(input); } @@ -263,11 +263,11 @@ public void WriteProtobuf(string file, EDSsharp eds, bool json) var formatterConfig = new JsonFormatter.Settings(true).WithIndentation().WithFormatDefaultValues(true); var formatter = new JsonFormatter(formatterConfig); var rawJsonString = formatter.Format(dev); - File.WriteAllText(file, rawJsonString); + System.IO.File.WriteAllText(file, rawJsonString); } else { - using (var output = File.Create(file)) + using (var output = System.IO.File.Create(file)) { dev.WriteTo(output); } diff --git a/libEDSsharp/CanOpenXSD_1_0.cs b/libEDSsharp/CanOpenXSD_1_0.cs index a981b552..475c6d23 100644 --- a/libEDSsharp/CanOpenXSD_1_0.cs +++ b/libEDSsharp/CanOpenXSD_1_0.cs @@ -4999,14 +4999,14 @@ public bool numberSpecified public partial class dictionary { - private file fileField; + private File fileField; private string langField; private string dictIDField; /// - public file file + public File file { get { @@ -5054,7 +5054,7 @@ public string dictID [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://www.canopen.org/xml/1.0")] [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://www.canopen.org/xml/1.0", IsNullable = false)] - public partial class file + public partial class File { private string uRIField; diff --git a/libEDSsharp/CanOpenXSD_1_1.cs b/libEDSsharp/CanOpenXSD_1_1.cs index 21730392..4ef42cf8 100644 --- a/libEDSsharp/CanOpenXSD_1_1.cs +++ b/libEDSsharp/CanOpenXSD_1_1.cs @@ -4357,10 +4357,10 @@ public bool multipleChilds { [System.Xml.Serialization.XmlRootAttribute(Namespace="http://www.canopen.org/xml/1.1", IsNullable=false)] public partial class fileList { - private file fileField; + private File fileField; /// - public file file { + public File file { get { return this.fileField; } @@ -4377,7 +4377,7 @@ public file file { [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="http://www.canopen.org/xml/1.1")] [System.Xml.Serialization.XmlRootAttribute(Namespace="http://www.canopen.org/xml/1.1", IsNullable=false)] - public partial class file { + public partial class File { private string uRIField; @@ -4867,14 +4867,14 @@ public bool numberSpecified { [System.Xml.Serialization.XmlRootAttribute(Namespace="http://www.canopen.org/xml/1.1", IsNullable=false)] public partial class dictionary { - private file fileField; + private File fileField; private string langField; private string dictIDField; /// - public file file { + public File file { get { return this.fileField; } From 11b8eff8e8c8c1b43a520e844312f6a6297500b7 Mon Sep 17 00:00:00 2001 From: Lars Elgtvedt Susaas Date: Sun, 10 Nov 2024 12:04:57 +0100 Subject: [PATCH 3/3] changed github action --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index da2a6c10..afcc9464 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - dotnet: [net481, net6] + dotnet: [net481, net8] configuration: [Debug, Release] runs-on: windows-latest