From 570c886607d982fc657bc0a31a9d3a4efb783f6e Mon Sep 17 00:00:00 2001 From: Gareth Luckett Date: Fri, 1 Feb 2019 17:55:15 +0000 Subject: [PATCH 1/9] Updated to dotnet standard Converted test project to dotnet core. --- .gitignore | 1 + WHMCS.Net.Test/OrderTest.cs | 8 +- WHMCS.Net.Test/Properties/AssemblyInfo.cs | 36 --------- WHMCS.Net.Test/WHMCS.Net.Tests.csproj | 92 ++++----------------- WHMCS.Net.Test/packages.config | 6 -- WHMCS.Net/Properties/AssemblyInfo.cs | 36 --------- WHMCS.Net/WHMCS.Net.csproj | 97 +++-------------------- WHMCS.Net/WHMCS.net.nuspec | 16 ---- WHMCS.Net/packages.config | 4 - WHMCS.net.sln | 10 ++- packages/repositories.config | 5 -- 11 files changed, 39 insertions(+), 272 deletions(-) delete mode 100644 WHMCS.Net.Test/Properties/AssemblyInfo.cs delete mode 100644 WHMCS.Net.Test/packages.config delete mode 100644 WHMCS.Net/Properties/AssemblyInfo.cs delete mode 100644 WHMCS.Net/WHMCS.net.nuspec delete mode 100644 WHMCS.Net/packages.config delete mode 100644 packages/repositories.config diff --git a/.gitignore b/.gitignore index d363a97..a19b185 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ build/*.nupkg *.orig *.[Dd]ot[Ss]ettings /packages/* +/.vs/* !packages/repositories.config \ No newline at end of file diff --git a/WHMCS.Net.Test/OrderTest.cs b/WHMCS.Net.Test/OrderTest.cs index 68867fb..31dcc98 100644 --- a/WHMCS.Net.Test/OrderTest.cs +++ b/WHMCS.Net.Test/OrderTest.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; using System.Collections.Specialized; -using System.Linq; using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; using Moq; using WHMCS.Net.Interfaces; using WHMCS.Net.Models; @@ -14,8 +10,8 @@ namespace WHMCS.Net.Test { public class OrderTest { - private readonly string _jsonData = "{}"; - private readonly Expression> _invoiceExpectation = datastore => datastore.GetData("Website", It.IsNotNull()); + readonly string _jsonData = "{}"; + readonly Expression> _invoiceExpectation = datastore => datastore.GetData("Website", It.IsNotNull()); [Fact] public void TestGetSingleInvoice() diff --git a/WHMCS.Net.Test/Properties/AssemblyInfo.cs b/WHMCS.Net.Test/Properties/AssemblyInfo.cs deleted file mode 100644 index 00f1ce1..0000000 --- a/WHMCS.Net.Test/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("WHMCS.Net.Test")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WHMCS.Net.Test")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[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("6b7acb95-cf42-4a72-b42e-1ae1072b6ad6")] - -// 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/WHMCS.Net.Test/WHMCS.Net.Tests.csproj b/WHMCS.Net.Test/WHMCS.Net.Tests.csproj index 3b54679..2187564 100644 --- a/WHMCS.Net.Test/WHMCS.Net.Tests.csproj +++ b/WHMCS.Net.Test/WHMCS.Net.Tests.csproj @@ -1,78 +1,20 @@ - - - - - Debug - AnyCPU - {0767F795-9A66-4D11-A4CA-2ACE7F904A9E} - Library - Properties - WHMCS.Net.Test - WHMCS.Net.Test - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll - - - - - False - ..\packages\xunit.1.9.2\lib\net20\xunit.dll - - - - - - - - - - - - - {846231f2-7d3f-4189-882c-165e96b2da4c} - WHMCS.Net - - - - - - - - - - - + + - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + netcoreapp2.2 + false + - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/WHMCS.Net.Test/packages.config b/WHMCS.Net.Test/packages.config deleted file mode 100644 index ec14aaf..0000000 --- a/WHMCS.Net.Test/packages.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/WHMCS.Net/Properties/AssemblyInfo.cs b/WHMCS.Net/Properties/AssemblyInfo.cs deleted file mode 100644 index 909dfe3..0000000 --- a/WHMCS.Net/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("WHMCS.Net")] -[assembly: AssemblyDescription("A .net library allowing you to connect to a WHMCS installation and query the API")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Gareth Luckett")] -[assembly: AssemblyProduct("WHMCS.Net")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[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("4bf4ac0f-e1bf-41f0-b1ca-d341a0aa7d6c")] - -// 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("0.4.0.0")] -[assembly: AssemblyFileVersion("0.4.0.0")] diff --git a/WHMCS.Net/WHMCS.Net.csproj b/WHMCS.Net/WHMCS.Net.csproj index f0a4938..3f42b50 100644 --- a/WHMCS.Net/WHMCS.Net.csproj +++ b/WHMCS.Net/WHMCS.Net.csproj @@ -1,85 +1,14 @@ - - - - - Release - AnyCPU - {846231F2-7D3F-4189-882C-165E96B2DA4C} - Library - Properties - WHMCS.Net - WHMCS.Net - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + netstandard2.0;net45 + https://github.com/lareeth/WHMCS.net + WHMCS + Gareth Luckett + + + + + + \ No newline at end of file diff --git a/WHMCS.Net/WHMCS.net.nuspec b/WHMCS.Net/WHMCS.net.nuspec deleted file mode 100644 index d425592..0000000 --- a/WHMCS.Net/WHMCS.net.nuspec +++ /dev/null @@ -1,16 +0,0 @@ - - - - $id$ - $version$ - $title$ - $author$ - $author$ - https://github.com/lareeth/WHMCS.net - false - $description$ - https://github.com/lareeth/WHMCS.net/releases/tag/v0.1 - Copyright 2015 - WHMCS - - \ No newline at end of file diff --git a/WHMCS.Net/packages.config b/WHMCS.Net/packages.config deleted file mode 100644 index 747efc5..0000000 --- a/WHMCS.Net/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/WHMCS.net.sln b/WHMCS.net.sln index 9a8e740..62d2e6e 100644 --- a/WHMCS.net.sln +++ b/WHMCS.net.sln @@ -1,13 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.271 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WHMCS.Net", "WHMCS.Net\WHMCS.Net.csproj", "{846231F2-7D3F-4189-882C-165E96B2DA4C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WHMCS.Net", "WHMCS.Net\WHMCS.Net.csproj", "{846231F2-7D3F-4189-882C-165E96B2DA4C}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WHMCS.Net.Tests", "WHMCS.Net.Test\WHMCS.Net.Tests.csproj", "{0767F795-9A66-4D11-A4CA-2ACE7F904A9E}" EndProject - Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -26,4 +25,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {06C5C9E6-A777-4C62-ACDA-168D86D9040D} + EndGlobalSection EndGlobal diff --git a/packages/repositories.config b/packages/repositories.config deleted file mode 100644 index 42756df..0000000 --- a/packages/repositories.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file From 8cb42eba130f970ba5bab4ab835b60428e7fb2c7 Mon Sep 17 00:00:00 2001 From: Gareth Luckett Date: Fri, 1 Feb 2019 18:03:03 +0000 Subject: [PATCH 2/9] Updated travis build to use dotnet sdk --- .travis.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b6cc08f..c7ccf2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: csharp -solution: WHMCS.net.sln -install: - - nuget restore WHMCS.net.sln - - nuget install xunit.runners -Version 1.9.2 -OutputDirectory testrunner +mono: none +dotnet: 2.2.103 + script: - - xbuild /p:Configuration=Release WHMCS.net.sln - - mono ./testrunner/xunit.runners.1.9.2/tools/xunit.console.clr4.exe ./WHMCS.Net.Test/bin/Release/WHMCS.Net.Test.dll \ No newline at end of file + - dotnet test \ No newline at end of file From d734ec8dbc961ba3d57440ca3177831309fc93ee Mon Sep 17 00:00:00 2001 From: Gareth Luckett Date: Fri, 1 Feb 2019 18:09:26 +0000 Subject: [PATCH 3/9] Updated build to use xenial --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index c7ccf2b..9115c11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: csharp mono: none +dist: xenial dotnet: 2.2.103 script: From caa142c92b5f08c9a5b6998045f720e3e052aff7 Mon Sep 17 00:00:00 2001 From: Gareth Luckett Date: Fri, 1 Feb 2019 18:14:36 +0000 Subject: [PATCH 4/9] Updated commands to just target linux. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9115c11..dd5a14b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,5 @@ dist: xenial dotnet: 2.2.103 script: - - dotnet test \ No newline at end of file + - dotnet build -r linux-x64 + - dotnet test --no-build \ No newline at end of file From b1013c95f1229e2f9ab9b8cf3d71f6663fe46b6a Mon Sep 17 00:00:00 2001 From: Gareth Luckett Date: Fri, 10 Jan 2020 15:31:45 +0000 Subject: [PATCH 5/9] Upgrade to netstandard 2.1 --- WHMCS.Net.Test/WHMCS.Net.Tests.csproj | 2 +- WHMCS.Net/WHMCS.Net.csproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/WHMCS.Net.Test/WHMCS.Net.Tests.csproj b/WHMCS.Net.Test/WHMCS.Net.Tests.csproj index 2187564..4906f0a 100644 --- a/WHMCS.Net.Test/WHMCS.Net.Tests.csproj +++ b/WHMCS.Net.Test/WHMCS.Net.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.2 + netstandard2.1 false diff --git a/WHMCS.Net/WHMCS.Net.csproj b/WHMCS.Net/WHMCS.Net.csproj index 3f42b50..ee870bd 100644 --- a/WHMCS.Net/WHMCS.Net.csproj +++ b/WHMCS.Net/WHMCS.Net.csproj @@ -1,14 +1,14 @@  - netstandard2.0;net45 + netstandard2.1 https://github.com/lareeth/WHMCS.net WHMCS Gareth Luckett - + \ No newline at end of file From a732bdc906a63d41527c0b2b35483344d906227c Mon Sep 17 00:00:00 2001 From: Gareth Luckett Date: Fri, 10 Jan 2020 15:34:41 +0000 Subject: [PATCH 6/9] Updated travis to use dotnet sdk 3.1.100 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dd5a14b..e2e07a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: csharp mono: none dist: xenial -dotnet: 2.2.103 +dotnet: 3.1.100 script: - dotnet build -r linux-x64 From 2101e99340090631ee1983b6e3559c55d394372f Mon Sep 17 00:00:00 2001 From: Gareth Luckett Date: Fri, 10 Jan 2020 15:40:04 +0000 Subject: [PATCH 7/9] Updated test libraries --- WHMCS.Net.Test/WHMCS.Net.Tests.csproj | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/WHMCS.Net.Test/WHMCS.Net.Tests.csproj b/WHMCS.Net.Test/WHMCS.Net.Tests.csproj index 4906f0a..56e9ecd 100644 --- a/WHMCS.Net.Test/WHMCS.Net.Tests.csproj +++ b/WHMCS.Net.Test/WHMCS.Net.Tests.csproj @@ -2,15 +2,17 @@ netstandard2.1 - false - + false - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + From 00f314bf20ef1a64c686ba1851bc6645b5aeba56 Mon Sep 17 00:00:00 2001 From: Gareth Luckett Date: Fri, 10 Jan 2020 15:55:00 +0000 Subject: [PATCH 8/9] Converted test project to dotnet core --- WHMCS.Net.Test/WHMCS.Net.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WHMCS.Net.Test/WHMCS.Net.Tests.csproj b/WHMCS.Net.Test/WHMCS.Net.Tests.csproj index 56e9ecd..88f0cc3 100644 --- a/WHMCS.Net.Test/WHMCS.Net.Tests.csproj +++ b/WHMCS.Net.Test/WHMCS.Net.Tests.csproj @@ -1,7 +1,7 @@  - netstandard2.1 + netcoreapp3.0 false From 6d1384e0162c8a0e89908d42154771e9755adb65 Mon Sep 17 00:00:00 2001 From: Gareth Luckett Date: Fri, 10 Jan 2020 15:58:10 +0000 Subject: [PATCH 9/9] Just use dotnet test --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2e07a5..441055e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,5 +4,4 @@ dist: xenial dotnet: 3.1.100 script: - - dotnet build -r linux-x64 - - dotnet test --no-build \ No newline at end of file + - dotnet test \ No newline at end of file