From 6a90a2876a55a01689147f7b92f2fc2c5360a08c Mon Sep 17 00:00:00 2001 From: Geoffroy BONNEVILLE Date: Mon, 23 Mar 2020 19:23:23 +0100 Subject: [PATCH] Migrated project type from PCL to full netstandard 1.2 --- .../ModernKeePassLib.Test.csproj | 2 +- ModernKeePassLib.sln | 12 +- .../Cryptography/Hash/HashAlgorithm.cs | 3 +- ModernKeePassLib/ModernKeePass.Lib.csproj | 194 ------------------ ModernKeePassLib/ModernKeePassLib.csproj | 68 ++++++ ModernKeePassLib/ModernKeePassLib.nuspec | 36 ---- .../{Native.Standard.cs => Native.PCL.cs} | 0 ModernKeePassLib/Properties/AssemblyInfo.cs | 44 ---- ModernKeePassLib/Translation/KPTranslation.cs | 2 +- ModernKeePassLib/app.config | 139 ------------- ModernKeePassLib/project.json | 17 -- 11 files changed, 77 insertions(+), 440 deletions(-) delete mode 100644 ModernKeePassLib/ModernKeePass.Lib.csproj create mode 100644 ModernKeePassLib/ModernKeePassLib.csproj delete mode 100644 ModernKeePassLib/ModernKeePassLib.nuspec rename ModernKeePassLib/Native/{Native.Standard.cs => Native.PCL.cs} (100%) delete mode 100644 ModernKeePassLib/Properties/AssemblyInfo.cs delete mode 100644 ModernKeePassLib/app.config delete mode 100644 ModernKeePassLib/project.json diff --git a/ModernKeePassLib.Test/ModernKeePassLib.Test.csproj b/ModernKeePassLib.Test/ModernKeePassLib.Test.csproj index 0da699a..2e97581 100644 --- a/ModernKeePassLib.Test/ModernKeePassLib.Test.csproj +++ b/ModernKeePassLib.Test/ModernKeePassLib.Test.csproj @@ -22,7 +22,7 @@ - + diff --git a/ModernKeePassLib.sln b/ModernKeePassLib.sln index 72e80cf..6eb5f35 100644 --- a/ModernKeePassLib.sln +++ b/ModernKeePassLib.sln @@ -3,24 +3,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29911.84 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModernKeePass.Lib", "ModernKeePassLib\ModernKeePass.Lib.csproj", "{2E710089-9559-4967-846C-E763DD1F3ACB}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModernKeePassLib.Test", "ModernKeePassLib.Test\ModernKeePassLib.Test.csproj", "{25A15ECA-3648-47B2-97DF-491D69126231}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModernKeePassLib", "ModernKeePassLib\ModernKeePassLib.csproj", "{85C3EA08-C9C4-4A8E-AB52-BE8A6475B787}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2E710089-9559-4967-846C-E763DD1F3ACB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E710089-9559-4967-846C-E763DD1F3ACB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E710089-9559-4967-846C-E763DD1F3ACB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E710089-9559-4967-846C-E763DD1F3ACB}.Release|Any CPU.Build.0 = Release|Any CPU {25A15ECA-3648-47B2-97DF-491D69126231}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {25A15ECA-3648-47B2-97DF-491D69126231}.Debug|Any CPU.Build.0 = Debug|Any CPU {25A15ECA-3648-47B2-97DF-491D69126231}.Release|Any CPU.ActiveCfg = Release|Any CPU {25A15ECA-3648-47B2-97DF-491D69126231}.Release|Any CPU.Build.0 = Release|Any CPU + {85C3EA08-C9C4-4A8E-AB52-BE8A6475B787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85C3EA08-C9C4-4A8E-AB52-BE8A6475B787}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85C3EA08-C9C4-4A8E-AB52-BE8A6475B787}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85C3EA08-C9C4-4A8E-AB52-BE8A6475B787}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ModernKeePassLib/Cryptography/Hash/HashAlgorithm.cs b/ModernKeePassLib/Cryptography/Hash/HashAlgorithm.cs index 093de1f..203b92d 100644 --- a/ModernKeePassLib/Cryptography/Hash/HashAlgorithm.cs +++ b/ModernKeePassLib/Cryptography/Hash/HashAlgorithm.cs @@ -1,7 +1,6 @@ using System; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Security.Cryptography.Core; -using Validation; namespace ModernKeePassLib.Cryptography.Hash { @@ -18,7 +17,7 @@ namespace ModernKeePassLib.Cryptography.Hash /// The platform hash. internal HashAlgorithm(CryptographicHash hash) { - Requires.NotNull(hash, "Hash"); + if (hash == null) throw new ArgumentNullException(nameof(hash)); _hash = hash; } diff --git a/ModernKeePassLib/ModernKeePass.Lib.csproj b/ModernKeePassLib/ModernKeePass.Lib.csproj deleted file mode 100644 index c0b0e38..0000000 --- a/ModernKeePassLib/ModernKeePass.Lib.csproj +++ /dev/null @@ -1,194 +0,0 @@ - - - - Debug - AnyCPU - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {2E710089-9559-4967-846C-E763DD1F3ACB} - Library - Properties - ModernKeePassLib - ModernKeePassLib - false - - - 2.0 - - - - - v5.0 - KeePassLib.pfx - - - 14.0 - - - true - full - false - bin\Debug - DEBUG;ModernKeePassLib - prompt - 4 - AnyCPU - - - true - bin\Release - prompt - 4 - ModernKeePassLib - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - Libs\Windows.winmd - False - - - - \ No newline at end of file diff --git a/ModernKeePassLib/ModernKeePassLib.csproj b/ModernKeePassLib/ModernKeePassLib.csproj new file mode 100644 index 0000000..a4698aa --- /dev/null +++ b/ModernKeePassLib/ModernKeePassLib.csproj @@ -0,0 +1,68 @@ + + + + netstandard1.2 + Portable KeePass Password Management Library that targets .Net Standard and WinRT. Allows reading, editing and writing to KeePass 2.x databases. + 2.44.1 + Geoffroy Bonneville + wismna + https://github.com/wismna/ModernKeePass + Implementation of KeePass library version 2.44 + Copyright © 2018 Geoffroy Bonneville + KeePass KeePassLib Portable PCL NetStandard + https://www.gnu.org/licenses/gpl-3.0.en.html + + + + TRACE;ModernKeePassLib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Libs\Windows.winmd + true + + + + diff --git a/ModernKeePassLib/ModernKeePassLib.nuspec b/ModernKeePassLib/ModernKeePassLib.nuspec deleted file mode 100644 index e6e594b..0000000 --- a/ModernKeePassLib/ModernKeePassLib.nuspec +++ /dev/null @@ -1,36 +0,0 @@ - - - - ModernKeePassLib - 2.39.1 - ModernKeePassLib - Geoffroy Bonneville - Geoffroy Bonneville - https://www.gnu.org/licenses/gpl-3.0.en.html - https://github.com/wismna/ModernKeePass - false - Portable KeePass Password Management Library that targets .Net Standard and WinRT. Allows reading, editing and writing to KeePass 2.x databases. - Implementation of KeePass library version 2.39.1 - Copyright © 2018 Geoffroy Bonneville - KeePass KeePassLib Portable PCL NetStandard - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ModernKeePassLib/Native/Native.Standard.cs b/ModernKeePassLib/Native/Native.PCL.cs similarity index 100% rename from ModernKeePassLib/Native/Native.Standard.cs rename to ModernKeePassLib/Native/Native.PCL.cs diff --git a/ModernKeePassLib/Properties/AssemblyInfo.cs b/ModernKeePassLib/Properties/AssemblyInfo.cs deleted file mode 100644 index 411f4d2..0000000 --- a/ModernKeePassLib/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,44 +0,0 @@ -/* - KeePass Password Safe - The Open-Source Password Manager - Copyright (C) 2003-2020 Dominik Reichl - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General assembly properties -[assembly: AssemblyTitle("ModernKeePassLib")] -[assembly: AssemblyDescription("KeePass Password Management Library for .Net Standard")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("wismna")] -[assembly: AssemblyProduct("ModernKeePassLib")] -[assembly: AssemblyCopyright("Copyright © 2020 Geoffroy Bonneville")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// COM settings -[assembly: ComVisible(false)] - -#if !ModernKeePassLib -// Assembly GUID -[assembly: Guid("395f6eec-a1e0-4438-aa82-b75099348134")] -#endif - -// Assembly version information -[assembly: AssemblyVersion("2.44.1.*")] -[assembly: AssemblyFileVersion("2.44.1.0")] diff --git a/ModernKeePassLib/Translation/KPTranslation.cs b/ModernKeePassLib/Translation/KPTranslation.cs index 57f9281..fdbe64e 100644 --- a/ModernKeePassLib/Translation/KPTranslation.cs +++ b/ModernKeePassLib/Translation/KPTranslation.cs @@ -174,7 +174,7 @@ namespace ModernKeePassLib.Translation return new Dictionary(); } -#if (!KeePassLibSD && !KeePassUAP !&&ModernKeePassLib) +#if (!KeePassLibSD && !KeePassUAP && !ModernKeePassLib) public void ApplyTo(Form form) { if(form == null) throw new ArgumentNullException("form"); diff --git a/ModernKeePassLib/app.config b/ModernKeePassLib/app.config deleted file mode 100644 index 9cf3b82..0000000 --- a/ModernKeePassLib/app.config +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ModernKeePassLib/project.json b/ModernKeePassLib/project.json deleted file mode 100644 index e8621de..0000000 --- a/ModernKeePassLib/project.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "supports": {}, - "dependencies": { - "Microsoft.NETCore.Portable.Compatibility": "1.0.2", - "NETStandard.Library": "2.0.3", - "Portable.BouncyCastle": "1.8.2", - "SixLabors.ImageSharp": "1.0.0-beta0005", - "Splat": "3.0.0", - "System.Runtime.WindowsRuntime": "4.3.0", - "System.Xml.ReaderWriter": "4.3.1", - "System.Xml.XmlSerializer": "4.3.0", - "Validation": "2.4.18" - }, - "frameworks": { - "netstandard1.2": {} - } -} \ No newline at end of file