From 12348eac854c948052446324119907c29df33997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Thu, 27 Aug 2020 11:14:27 +0200 Subject: [PATCH] chore: update to .NET standard 2.1 and .NET Core 3.1 --- NosTaleGfless.sln | 10 +- NosTaleGfless/NosTaleGfless.csproj | 2 +- NostaleAuth/NostaleAuth.csproj | 2 +- .../NostaleGfless.Example.csproj | 94 +++++-------------- NostaleGfless.Example/Program.cs | 22 ++--- .../Properties/AssemblyInfo.cs | 35 ------- 6 files changed, 39 insertions(+), 126 deletions(-) delete mode 100644 NostaleGfless.Example/Properties/AssemblyInfo.cs diff --git a/NosTaleGfless.sln b/NosTaleGfless.sln index aed9cd3..0b1924d 100644 --- a/NosTaleGfless.sln +++ b/NosTaleGfless.sln @@ -4,7 +4,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosTaleGfless", "NosTaleGfl EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NostaleAuth", "NostaleAuth\NostaleAuth.csproj", "{63031600-41E1-4B37-A9C5-90CFF5196806}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NostaleGfless.Example", "NostaleGfless.Example\NostaleGfless.Example.csproj", "{66C5FF7F-E7A3-404D-A84A-4B91C1A12980}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NostaleGfless.Example", "NostaleGfless.Example\NostaleGfless.Example.csproj", "{C451472E-0D92-48A2-A6C1-E36AF709DBF2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -20,9 +20,9 @@ Global {63031600-41E1-4B37-A9C5-90CFF5196806}.Debug|Any CPU.Build.0 = Debug|Any CPU {63031600-41E1-4B37-A9C5-90CFF5196806}.Release|Any CPU.ActiveCfg = Release|Any CPU {63031600-41E1-4B37-A9C5-90CFF5196806}.Release|Any CPU.Build.0 = Release|Any CPU - {66C5FF7F-E7A3-404D-A84A-4B91C1A12980}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {66C5FF7F-E7A3-404D-A84A-4B91C1A12980}.Debug|Any CPU.Build.0 = Debug|Any CPU - {66C5FF7F-E7A3-404D-A84A-4B91C1A12980}.Release|Any CPU.ActiveCfg = Release|Any CPU - {66C5FF7F-E7A3-404D-A84A-4B91C1A12980}.Release|Any CPU.Build.0 = Release|Any CPU + {C451472E-0D92-48A2-A6C1-E36AF709DBF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C451472E-0D92-48A2-A6C1-E36AF709DBF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C451472E-0D92-48A2-A6C1-E36AF709DBF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C451472E-0D92-48A2-A6C1-E36AF709DBF2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/NosTaleGfless/NosTaleGfless.csproj b/NosTaleGfless/NosTaleGfless.csproj index 762252d..7ac83b4 100644 --- a/NosTaleGfless/NosTaleGfless.csproj +++ b/NosTaleGfless/NosTaleGfless.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 diff --git a/NostaleAuth/NostaleAuth.csproj b/NostaleAuth/NostaleAuth.csproj index 8b35e29..e478bbb 100644 --- a/NostaleAuth/NostaleAuth.csproj +++ b/NostaleAuth/NostaleAuth.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 diff --git a/NostaleGfless.Example/NostaleGfless.Example.csproj b/NostaleGfless.Example/NostaleGfless.Example.csproj index d50b178..c95b7dc 100644 --- a/NostaleGfless.Example/NostaleGfless.Example.csproj +++ b/NostaleGfless.Example/NostaleGfless.Example.csproj @@ -1,72 +1,22 @@ - - - - - Debug - AnyCPU - {66C5FF7F-E7A3-404D-A84A-4B91C1A12980} - Exe - Properties - NostaleGfless.Example - NostaleGfless.Example - v4.7.2 - 512 - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - {63031600-41e1-4b37-a9c5-90cff5196806} - NostaleAuth - - - {a3f83a69-3981-4c18-953d-dfc7384e041e} - NosTaleGfless - - - - - - - - - app.manifest - - \ No newline at end of file + + + + Exe + netcoreapp3.1 + + + + app.manifest + + + + + + + + + + + + + diff --git a/NostaleGfless.Example/Program.cs b/NostaleGfless.Example/Program.cs index 9cbf97b..57b35d5 100644 --- a/NostaleGfless.Example/Program.cs +++ b/NostaleGfless.Example/Program.cs @@ -12,28 +12,29 @@ namespace NostaleGfless.Example internal class Program { static EventWaitHandle ewh = new ManualResetEvent(false); - + public static void Main(string[] args) { - string installationIdString = (string)Registry.GetValue(@"HKEY_CURRENT_USER\Software\Gameforge4d\TNTClient\MainApp", + string installationIdString = (string) Registry.GetValue( + @"HKEY_CURRENT_USER\Software\Gameforge4d\TNTClient\MainApp", "InstallationId", null); - + Guid? installationId = null; if (installationIdString != null) { installationId = Guid.Parse(installationIdString); } - + Parser.Default.ParseArguments(args).WithParsed(async options => { if (options.InstallationId != null) { installationId = Guid.Parse(options.InstallationId); } - + var authenticator = new GameforgeAuthenticator(); authenticator.InstallationId = installationId; - var launcher = await authenticator.Authenticate(options.Email, options.Password); + var launcher = await authenticator.Authenticate(options.Email, options.Password); if (launcher.Accounts.Count == 0) { throw new InvalidOperationException("There are no nostale account on the gameforge account"); @@ -56,7 +57,7 @@ namespace NostaleGfless.Example throw new InvalidOperationException($"Account {accountName} not found"); } } - + accounts.Add(account); } } @@ -86,11 +87,8 @@ namespace NostaleGfless.Example } ewh.Set(); - }).WithNotParsed((err) => - { - ewh.Set(); - }); - + }).WithNotParsed((err) => { ewh.Set(); }); + ewh.WaitOne(); } } diff --git a/NostaleGfless.Example/Properties/AssemblyInfo.cs b/NostaleGfless.Example/Properties/AssemblyInfo.cs deleted file mode 100644 index 6f4fdc9..0000000 --- a/NostaleGfless.Example/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -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("NostaleGfless.Example")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NostaleGfless.Example")] -[assembly: AssemblyCopyright("Copyright © 2020")] -[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("66C5FF7F-E7A3-404D-A84A-4B91C1A12980")] - -// 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")] \ No newline at end of file -- 2.48.1