From bd238a894f9d985347c7dc8fb50fb8d2f98b78ae Mon Sep 17 00:00:00 2001 From: Sebastian Loncar Date: Sun, 30 Aug 2020 19:42:49 +0200 Subject: [PATCH 1/8] use netstandard nrefactory --- Compiler/Compiler.sln | 81 ++++++- Compiler/skc5/Compiler/CompilerTool.cs | 2 +- .../Compiler/SourceMapping/SourceMapping.cs | 1 - .../Compiler/SourceMapping/SourceMappingV3.cs | 10 +- Compiler/skc5/Properties/AssemblyInfo.cs | 11 - Compiler/skc5/skc5.csproj | 223 +++--------------- external/NRefactory | 2 +- external/cecil | 2 +- 8 files changed, 113 insertions(+), 219 deletions(-) diff --git a/Compiler/Compiler.sln b/Compiler/Compiler.sln index cabeccc..8e6d1a5 100644 --- a/Compiler/Compiler.sln +++ b/Compiler/Compiler.sln @@ -1,17 +1,23 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30501.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30413.136 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skc5", "skc5\skc5.csproj", "{6307BDF9-19E4-4925-99DC-29773D8F0AF1}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skc5", "skc5\skc5.csproj", "{6307BDF9-19E4-4925-99DC-29773D8F0AF1}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp.Tasks", "CSharp.Tasks\CSharp.Tasks.csproj", "{4D31FC05-54E2-48F7-9DEF-4FDB2179A872}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E09479B2-B122-4FD9-B68E-8A863AC2587D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mono.Cecil", "..\external\cecil\Mono.Cecil.csproj", "{A305E28E-36BE-4E4D-9141-EFE5515506F9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.NRefactory", "..\external\NRefactory\ICSharpCode.NRefactory\ICSharpCode.NRefactory.csproj", "{9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.NRefactory.CSharp", "..\external\NRefactory\ICSharpCode.NRefactory.CSharp\ICSharpCode.NRefactory.CSharp.csproj", "{880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.NRefactory.Cecil", "..\external\NRefactory\ICSharpCode.NRefactory.Cecil\ICSharpCode.NRefactory.Cecil.csproj", "{9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}" +EndProject Global - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|Mixed Platforms = Debug|Mixed Platforms @@ -41,8 +47,69 @@ Global {4D31FC05-54E2-48F7-9DEF-4FDB2179A872}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {4D31FC05-54E2-48F7-9DEF-4FDB2179A872}.Release|Mixed Platforms.Build.0 = Release|Any CPU {4D31FC05-54E2-48F7-9DEF-4FDB2179A872}.Release|x86.ActiveCfg = Release|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Debug|x86.ActiveCfg = Debug|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Debug|x86.Build.0 = Debug|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Release|Any CPU.Build.0 = Release|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Release|x86.ActiveCfg = Release|Any CPU + {A305E28E-36BE-4E4D-9141-EFE5515506F9}.Release|x86.Build.0 = Release|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Debug|x86.ActiveCfg = Debug|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Debug|x86.Build.0 = Debug|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Release|Any CPU.Build.0 = Release|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Release|x86.ActiveCfg = Release|Any CPU + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9}.Release|x86.Build.0 = Release|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Debug|Any CPU.Build.0 = Debug|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Debug|x86.ActiveCfg = Debug|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Debug|x86.Build.0 = Debug|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Release|Any CPU.ActiveCfg = Release|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Release|Any CPU.Build.0 = Release|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Release|x86.ActiveCfg = Release|Any CPU + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563}.Release|x86.Build.0 = Release|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Debug|x86.ActiveCfg = Debug|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Debug|x86.Build.0 = Debug|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Release|Any CPU.Build.0 = Release|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Release|x86.ActiveCfg = Release|Any CPU + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {A305E28E-36BE-4E4D-9141-EFE5515506F9} = {E09479B2-B122-4FD9-B68E-8A863AC2587D} + {9C9FDE34-87E5-4257-A01C-FDA80EFC71D9} = {E09479B2-B122-4FD9-B68E-8A863AC2587D} + {880778E7-07E2-4F6C-A0A6-C7D6BAEAB563} = {E09479B2-B122-4FD9-B68E-8A863AC2587D} + {9FD870BF-C9EA-4D63-A180-1EB7EFD5E659} = {E09479B2-B122-4FD9-B68E-8A863AC2587D} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A0E115D7-0217-43FA-ACB0-82407F484C24} + EndGlobalSection + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection EndGlobal diff --git a/Compiler/skc5/Compiler/CompilerTool.cs b/Compiler/skc5/Compiler/CompilerTool.cs index 16a62a5..8d2d30f 100644 --- a/Compiler/skc5/Compiler/CompilerTool.cs +++ b/Compiler/skc5/Compiler/CompilerTool.cs @@ -918,7 +918,7 @@ void EmbedResources() EmbeddedResourceFiles.Add(att.Filename); var resName = att.ResourceName ?? att.Filename; Log.WriteLine("Embedding {0} -> {1}", att.Filename, resName); - var res = new EmbeddedResource(resName, ManifestResourceAttributes.Public, File.ReadAllBytes(att.Filename)); + var res = new EmbeddedResource(resName, Mono.Cecil.ManifestResourceAttributes.Public, File.ReadAllBytes(att.Filename)); var res2 = asm.Resources.Where(t => t.Name == res.Name).OfType().FirstOrDefault(); if (res2 == null) { diff --git a/Compiler/skc5/Compiler/SourceMapping/SourceMapping.cs b/Compiler/skc5/Compiler/SourceMapping/SourceMapping.cs index 0e880f6..34c2ec0 100644 --- a/Compiler/skc5/Compiler/SourceMapping/SourceMapping.cs +++ b/Compiler/skc5/Compiler/SourceMapping/SourceMapping.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Web.Script.Serialization; using System.IO; using System.Runtime.Serialization; diff --git a/Compiler/skc5/Compiler/SourceMapping/SourceMappingV3.cs b/Compiler/skc5/Compiler/SourceMapping/SourceMappingV3.cs index c00c7fd..2cadb9e 100644 --- a/Compiler/skc5/Compiler/SourceMapping/SourceMappingV3.cs +++ b/Compiler/skc5/Compiler/SourceMapping/SourceMappingV3.cs @@ -2,8 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using System.Web.Script.Serialization; using System.IO; +using System.Text.Json; +using System.Text.Json.Serialization; namespace SharpKit.Compiler.SourceMapping { @@ -43,7 +44,7 @@ public void SaveAs(string filename) { if (mappings == null) GenerateMappings(); - var s = new JavaScriptSerializer().Serialize(this); + var s = JsonSerializer.Serialize(this); File.WriteAllText(filename, s); } public int version { get; set; } @@ -53,13 +54,12 @@ public void SaveAs(string filename) public List sources { get; set; } public List names { get; set; } public string mappings { get; set; } - [ScriptIgnore] + [JsonIgnore] public List> ParsedMappings { get; set; } public static SourceMappingV3Document Load(string filename) { - var ser = new JavaScriptSerializer(); - var doc = ser.Deserialize(File.ReadAllText(filename)); + var doc = JsonSerializer.Deserialize(File.ReadAllText(filename)); doc.ParseMappings(); return doc; } diff --git a/Compiler/skc5/Properties/AssemblyInfo.cs b/Compiler/skc5/Properties/AssemblyInfo.cs index 2d97ace..51db2fb 100644 --- a/Compiler/skc5/Properties/AssemblyInfo.cs +++ b/Compiler/skc5/Properties/AssemblyInfo.cs @@ -5,14 +5,6 @@ // 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("skc5")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("skc5")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from @@ -20,7 +12,6 @@ [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("98ad7271-73df-4455-b85e-f6d1937514f8")] // Version information for an assembly consists of the following four values: // @@ -32,5 +23,3 @@ // 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("5.5.0")] diff --git a/Compiler/skc5/skc5.csproj b/Compiler/skc5/skc5.csproj index bd4d66a..91da8ec 100644 --- a/Compiler/skc5/skc5.csproj +++ b/Compiler/skc5/skc5.csproj @@ -1,192 +1,31 @@ - - - - - Debug - AnyCPU - {6307BDF9-19E4-4925-99DC-29773D8F0AF1} - Exe - Properties - SharpKit - skc5 - v4.7.2 - 512 - $(MSBuildProjectDirectory)..\..\lib\ - 12.0.0 - 2.0 - - - - - - AnyCPU - true - full - false - bin\ - TRACE;DEBUG - prompt - 4 - false - false - - - AnyCPU - pdbonly - true - bin\ - TRACE - prompt - 4 - false - false - - - - ..\..\external\AjaxMin\AjaxMinDll\bin\AjaxMinDll.dll - - - ..\..\external\corex\src\corex\bin\corex.dll - - - ..\..\external\NRefactory\bin\net_4_5_Debug\ICSharpCode.NRefactory.dll - ..\..\external\NRefactory\bin\net_4_5_Release\ICSharpCode.NRefactory.dll - - - ..\..\external\NRefactory\bin\net_4_5_Debug\ICSharpCode.NRefactory.Cecil.dll - ..\..\external\NRefactory\bin\net_4_5_Release\ICSharpCode.NRefactory.Cecil.dll - - - ..\..\external\NRefactory\bin\net_4_5_Debug\ICSharpCode.NRefactory.CSharp.dll - ..\..\external\NRefactory\bin\net_4_5_Release\ICSharpCode.NRefactory.CSharp.dll - - - False - ..\..\external\cecil\bin\net_4_0_Debug\Mono.Cecil.dll - ..\..\external\cecil\bin\net_4_0_Release\Mono.Cecil.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Component - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - - - - - - rem xcopy $(TargetDir)*.* C:\Windows\Microsoft.NET\Framework\v4.0.30319\SharpKit\5\ /C /Y /d - - #cp $(TargetDir)*.* C:\Windows\Microsoft.NET\Framework\v4.0.30319\SharpKit\5\ /C /Y /d - - - - \ No newline at end of file + + + Exe + netcoreapp3.1 + $(MSBuildProjectDirectory)..\..\lib\ + bin + false + + + + + + + + + + + + + + + ..\..\external\AjaxMin\AjaxMinDll\bin\AjaxMinDll.dll + + + ..\..\external\corex\src\corex\bin\corex.dll + + + + + + diff --git a/external/NRefactory b/external/NRefactory index bf6c674..79bbe8b 160000 --- a/external/NRefactory +++ b/external/NRefactory @@ -1 +1 @@ -Subproject commit bf6c674791768028861dbf50bcbd0519af7fd839 +Subproject commit 79bbe8b4ddb1fb18edfed1b83f63a330ca426be4 diff --git a/external/cecil b/external/cecil index db1e41d..3edd588 160000 --- a/external/cecil +++ b/external/cecil @@ -1 +1 @@ -Subproject commit db1e41dc16ab35f4aa6149ea4b60e8f940a5b82a +Subproject commit 3edd588bd7b513425dd11141b9cae1c7beb2ecda From 9c7f5a8638515c3ac3c0cc95af7345ae808d3fd6 Mon Sep 17 00:00:00 2001 From: Sebastian Loncar Date: Sun, 30 Aug 2020 19:49:20 +0200 Subject: [PATCH 2/8] added version --- Compiler/skc5/skc5.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Compiler/skc5/skc5.csproj b/Compiler/skc5/skc5.csproj index 91da8ec..23a9755 100644 --- a/Compiler/skc5/skc5.csproj +++ b/Compiler/skc5/skc5.csproj @@ -5,6 +5,7 @@ $(MSBuildProjectDirectory)..\..\lib\ bin false + 5.5.0 From 31c49f886bb26d99e2a3117a660ec2ccd1421c54 Mon Sep 17 00:00:00 2001 From: Sebastian Loncar Date: Sun, 30 Aug 2020 19:51:32 +0200 Subject: [PATCH 3/8] sync submodule --- SDK | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDK b/SDK index 66a6e64..822b931 160000 --- a/SDK +++ b/SDK @@ -1 +1 @@ -Subproject commit 66a6e64436c6254b60b7ea5aee54d026fff78237 +Subproject commit 822b931905d7316db189c4a046037074e8b1a057 From 4357816c527e6ed37ce9d399b593d1b575589136 Mon Sep 17 00:00:00 2001 From: Sebastian Loncar Date: Sat, 3 Oct 2020 13:09:03 +0200 Subject: [PATCH 4/8] porting tasks to .net core 3.1 WIP --- Compiler/CSharp.Tasks/CSharp.Tasks.csproj | 87 ------------------- .../CSharp.Tasks/Properties/AssemblyInfo.cs | 36 -------- .../CSharp.Tasks/SharpKit.CSharp.Tasks.csproj | 18 ++++ Compiler/CSharp.Tasks/Skc.cs | 34 ++------ 4 files changed, 25 insertions(+), 150 deletions(-) delete mode 100644 Compiler/CSharp.Tasks/CSharp.Tasks.csproj delete mode 100644 Compiler/CSharp.Tasks/Properties/AssemblyInfo.cs create mode 100644 Compiler/CSharp.Tasks/SharpKit.CSharp.Tasks.csproj diff --git a/Compiler/CSharp.Tasks/CSharp.Tasks.csproj b/Compiler/CSharp.Tasks/CSharp.Tasks.csproj deleted file mode 100644 index 8ccdcfc..0000000 --- a/Compiler/CSharp.Tasks/CSharp.Tasks.csproj +++ /dev/null @@ -1,87 +0,0 @@ - - - - - Debug - AnyCPU - {4D31FC05-54E2-48F7-9DEF-4FDB2179A872} - Library - Properties - SharpKit.CSharp.Tasks - SharpKit.CSharp.Tasks - v4.7.2 - 512 - $(MSBuildProjectDirectory)..\..\lib\ - 12.0.0 - 2.0 - - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - - - -copy $(ProjectDir)*.targets $(ProjectDir)..\skc5\bin\ -copy $(ProjectDir)*.Tasks $(ProjectDir)..\skc5\bin\ -copy $(ProjectDir)..\skc5\bin\SharpKit.CSharp.targets $(ProjectDir)..\skc5\bin\SharpKit.Build.targets -copy $(TargetDir)*.Tasks.dll $(ProjectDir)..\skc5\bin\ - -mkdir -p $(ProjectDir)..\skc5\bin -cp $(ProjectDir)*.targets $(ProjectDir)..\skc5\bin\ -cp $(ProjectDir)*.Tasks $(ProjectDir)..\skc5\bin\ -cp $(ProjectDir)..\skc5\bin\SharpKit.CSharp.targets $(ProjectDir)..\skc5\bin\SharpKit.Build.targets -cp $(TargetDir)*.Tasks.dll $(ProjectDir)..\skc5\bin\ - - - - \ No newline at end of file diff --git a/Compiler/CSharp.Tasks/Properties/AssemblyInfo.cs b/Compiler/CSharp.Tasks/Properties/AssemblyInfo.cs deleted file mode 100644 index c551e93..0000000 --- a/Compiler/CSharp.Tasks/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -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("SharpKit.CSharp.Tasks")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("SharpKit.CSharp.Tasks")] -[assembly: AssemblyCopyright("Copyright © 2013")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3597b3e7-3523-46b6-847d-87d8087c07df")] - -// 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("5.5.0")] diff --git a/Compiler/CSharp.Tasks/SharpKit.CSharp.Tasks.csproj b/Compiler/CSharp.Tasks/SharpKit.CSharp.Tasks.csproj new file mode 100644 index 0000000..5433b33 --- /dev/null +++ b/Compiler/CSharp.Tasks/SharpKit.CSharp.Tasks.csproj @@ -0,0 +1,18 @@ + + + netcoreapp3.1 + $(MSBuildProjectDirectory)..\..\lib\ + bin + false + 5.5.0 + + + + + + + + + + + diff --git a/Compiler/CSharp.Tasks/Skc.cs b/Compiler/CSharp.Tasks/Skc.cs index 555ee22..cf6d97f 100644 --- a/Compiler/CSharp.Tasks/Skc.cs +++ b/Compiler/CSharp.Tasks/Skc.cs @@ -1,20 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Build.Utilities; -using Microsoft.Build.Tasks; -using System.IO; + using Microsoft.Build.Framework; -using System.Diagnostics; +using Microsoft.CodeAnalysis.BuildTasks; +using System; using System.Globalization; -using System.Collections.Specialized; -using System.Collections; -//using SharpKit.Build.Tasks.CsbService.Client; -using System.Configuration; -using System.ServiceProcess; -//using System.ServiceModel.Configuration; -//using System.ServiceModel; +using System.IO; +using System.Text; namespace SharpKit.Build.Tools { @@ -25,10 +15,8 @@ public Skc() { } - protected override string GenerateFullPathToTool() - { - return Path.Combine(ToolPath, ToolExe); - } + protected override string ToolNameWithoutExtension => "skc"; + private static bool IsLegalIdentifier(string identifier) { if (identifier.Length == 0) @@ -263,14 +251,6 @@ protected override bool CallHostObjectToExecute() { return base.CallHostObjectToExecute(); } - protected override string ToolName - { - get - { - return "skc.exe"; - } - } - } From 62892be8700efd84f64779a153edb0d88c0efc02 Mon Sep 17 00:00:00 2001 From: Sebastian Loncar Date: Sun, 6 Dec 2020 00:31:39 +0100 Subject: [PATCH 5/8] fixed tasks --- .../CSharp.Tasks/SharpKit.CSharp.Tasks.csproj | 36 ++++++++----- Compiler/CSharp.Tasks/SharpKit.CSharp.targets | 43 ++++++++------- Compiler/CSharp.Tasks/Skc.cs | 8 ++- Compiler/Compiler.sln | 2 +- Compiler/skc5/skc5.csproj | 53 ++++++++++--------- 5 files changed, 79 insertions(+), 63 deletions(-) diff --git a/Compiler/CSharp.Tasks/SharpKit.CSharp.Tasks.csproj b/Compiler/CSharp.Tasks/SharpKit.CSharp.Tasks.csproj index 5433b33..20f66d4 100644 --- a/Compiler/CSharp.Tasks/SharpKit.CSharp.Tasks.csproj +++ b/Compiler/CSharp.Tasks/SharpKit.CSharp.Tasks.csproj @@ -1,17 +1,27 @@  - - netcoreapp3.1 - $(MSBuildProjectDirectory)..\..\lib\ - bin - false - 5.5.0 - - - - - - - + + net5.0 + $(MSBuildProjectDirectory)..\..\lib\ + bin + false + 5.5.0 + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + diff --git a/Compiler/CSharp.Tasks/SharpKit.CSharp.targets b/Compiler/CSharp.Tasks/SharpKit.CSharp.targets index 6c7a23c..794211a 100644 --- a/Compiler/CSharp.Tasks/SharpKit.CSharp.targets +++ b/Compiler/CSharp.Tasks/SharpKit.CSharp.targets @@ -1,34 +1,34 @@  - - - - $(MSBuildThisFileDirectory) - skc5.exe - + + + + $(MSBuildThisFileDirectory) + skc5.exe + false true true $(NoStdLib) - $(NoCompilerStandardLib) - + $(NoCompilerStandardLib) + true - - - <_CoreCompileResourceInputs2 Include="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)" /> - - - - false - - - - - + + + <_CoreCompileResourceInputs2 Include="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)" /> + + + + false + + + + + - - + diff --git a/Compiler/CSharp.Tasks/Skc.cs b/Compiler/CSharp.Tasks/Skc.cs index cf6d97f..c7a3b7c 100644 --- a/Compiler/CSharp.Tasks/Skc.cs +++ b/Compiler/CSharp.Tasks/Skc.cs @@ -9,10 +9,16 @@ namespace SharpKit.Build.Tools { - public class Skc : ManagedCompiler + public class Skc : Csc { public Skc() { + Trace("Init"); + } + + private void Trace(string message) + { + Console.WriteLine("###############################: " + message); } protected override string ToolNameWithoutExtension => "skc"; diff --git a/Compiler/Compiler.sln b/Compiler/Compiler.sln index 8e6d1a5..04f31d8 100644 --- a/Compiler/Compiler.sln +++ b/Compiler/Compiler.sln @@ -5,7 +5,7 @@ VisualStudioVersion = 16.0.30413.136 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "skc5", "skc5\skc5.csproj", "{6307BDF9-19E4-4925-99DC-29773D8F0AF1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp.Tasks", "CSharp.Tasks\CSharp.Tasks.csproj", "{4D31FC05-54E2-48F7-9DEF-4FDB2179A872}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp.Tasks", "CSharp.Tasks\SharpKit.CSharp.Tasks.csproj", "{4D31FC05-54E2-48F7-9DEF-4FDB2179A872}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NRefactory", "NRefactory", "{E09479B2-B122-4FD9-B68E-8A863AC2587D}" EndProject diff --git a/Compiler/skc5/skc5.csproj b/Compiler/skc5/skc5.csproj index 23a9755..c92b7e8 100644 --- a/Compiler/skc5/skc5.csproj +++ b/Compiler/skc5/skc5.csproj @@ -1,31 +1,32 @@  - - Exe - netcoreapp3.1 - $(MSBuildProjectDirectory)..\..\lib\ - bin - false - 5.5.0 - - - - - - - - - - - + + Exe + net5 + $(MSBuildProjectDirectory)..\..\lib\ + bin + false + 5.5.0 + + + + + + + + + + + + - - - ..\..\external\AjaxMin\AjaxMinDll\bin\AjaxMinDll.dll - - - ..\..\external\corex\src\corex\bin\corex.dll - - + + + ..\..\external\AjaxMin\AjaxMinDll\bin\AjaxMinDll.dll + + + ..\..\external\corex\src\corex\bin\corex.dll + + From 06b82a29bb4954d68ab1b7ecb2cb03d53fd42867 Mon Sep 17 00:00:00 2001 From: Sebastian Loncar Date: Sun, 6 Dec 2020 00:47:28 +0100 Subject: [PATCH 6/8] updated submodules --- external/AjaxMin | 2 +- external/corex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/external/AjaxMin b/external/AjaxMin index b90b35b..ca78916 160000 --- a/external/AjaxMin +++ b/external/AjaxMin @@ -1 +1 @@ -Subproject commit b90b35b60181ae1ef5be0df5a783fdc9a9ad1752 +Subproject commit ca7891646da6d5be22b0614838b45dbf234a06af diff --git a/external/corex b/external/corex index 00d8127..5f1e4c1 160000 --- a/external/corex +++ b/external/corex @@ -1 +1 @@ -Subproject commit 00d81278282e28c7b05903a86126118aa8c0ce53 +Subproject commit 5f1e4c12b29d90cce29dea5af8872a31f4c2cd76 From e69f9f540cc2d6729d4a0224c4e0a7114a3c1c69 Mon Sep 17 00:00:00 2001 From: Sebastian Loncar Date: Sun, 6 Dec 2020 00:58:09 +0100 Subject: [PATCH 7/8] submodule --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 31ca30c..9f69f79 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,7 +8,7 @@ ignore = dirty [submodule "external/cecil"] path = external/cecil - url = https://github.com/jbevain/cecil + url = https://github.com/SharpKit/cecil ignore = dirty [submodule "SDK"] path = SDK From 41b1cba908c05c9a340faee6c6ca28a78934fb13 Mon Sep 17 00:00:00 2001 From: Sebastian Loncar Date: Sun, 6 Dec 2020 01:10:56 +0100 Subject: [PATCH 8/8] use dotnet build command --- Compiler/CSharp.Tasks/make.cmd | 4 ++-- Compiler/skc5/make.cmd | 4 ++-- external/make.cmd | 24 ++++++++++++------------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Compiler/CSharp.Tasks/make.cmd b/Compiler/CSharp.Tasks/make.cmd index 7156070..049d8c6 100644 --- a/Compiler/CSharp.Tasks/make.cmd +++ b/Compiler/CSharp.Tasks/make.cmd @@ -3,11 +3,11 @@ IF not "%1" == "release" ( -%msbuild% CSharp.Tasks.csproj +dotnet build ) ELSE ( -%msbuild% /p:Configuration=Release CSharp.Tasks.csproj +dotnet build /p:Configuration=Release CSharp.Tasks.csproj ) diff --git a/Compiler/skc5/make.cmd b/Compiler/skc5/make.cmd index 1168b46..c4790ab 100644 --- a/Compiler/skc5/make.cmd +++ b/Compiler/skc5/make.cmd @@ -3,11 +3,11 @@ IF not "%1" == "release" ( -dotnet msbuild skc5.csproj +dotnet build ) ELSE ( -dotnet msbuild skc5.csproj /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None +dotnet build /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None ) diff --git a/external/make.cmd b/external/make.cmd index 02e092c..6a4bcc1 100644 --- a/external/make.cmd +++ b/external/make.cmd @@ -3,20 +3,20 @@ IF not "%1" == "release" ( -dotnet msbuild /p:Configuration=net_4_0_Release cecil/Mono.Cecil.csproj /verbosity:minimal -dotnet msbuild NRefactory/NRefactory.sln /p:Configuration=net_4_5_Debug /verbosity:minimal -dotnet msbuild corex/corex.sln /verbosity:minimal -dotnet msbuild AjaxMin/AjaxMinDll/AjaxMinDll.sln /verbosity:minimal -dotnet msbuild SharpZipLib/src/ICSharpCode.SharpZLib.csproj /verbosity:minimal -dotnet msbuild octokit.net/Octokit/Octokit-Mono.csproj /verbosity:minimal +dotnet build /p:Configuration=net_4_0_Release cecil/Mono.Cecil.csproj /verbosity:minimal +dotnet build NRefactory/NRefactory.sln /p:Configuration=net_4_5_Debug /verbosity:minimal +dotnet build corex/corex.sln /verbosity:minimal +dotnet build AjaxMin/AjaxMinDll/AjaxMinDll.sln /verbosity:minimal +dotnet build SharpZipLib/src/ICSharpCode.SharpZLib.csproj /verbosity:minimal +dotnet build octokit.net/Octokit/Octokit-Mono.csproj /verbosity:minimal ) ELSE ( -dotnet msbuild cecil/Mono.Cecil.csproj /p:Configuration=net_4_0_Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal -dotnet msbuild NRefactory/NRefactory.sln /p:Configuration=net_4_5_Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal -dotnet msbuild corex/corex.sln /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal -dotnet msbuild AjaxMin/AjaxMinDll/AjaxMinDll.sln /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal -dotnet msbuild SharpZipLib/src/ICSharpCode.SharpZLib.csproj /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal -dotnet msbuild octokit.net/Octokit/Octokit-Mono.csproj /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal +dotnet build cecil/Mono.Cecil.csproj /p:Configuration=net_4_0_Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal +dotnet build NRefactory/NRefactory.sln /p:Configuration=net_4_5_Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal +dotnet build corex/corex.sln /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal +dotnet build AjaxMin/AjaxMinDll/AjaxMinDll.sln /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal +dotnet build SharpZipLib/src/ICSharpCode.SharpZLib.csproj /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal +dotnet build octokit.net/Octokit/Octokit-Mono.csproj /p:Configuration=Release /p:DebugSymbols=false /p:DebugType=None /verbosity:minimal )