From 3f8fecd0dc953af36248268106a8ec38c3e1094a Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 24 Jun 2016 16:55:49 -0700 Subject: [PATCH] Port TypeCatalogGen to .NET Core --- src/TypeCatalogGen/TypeCatalogGen.cs | 10 +++++----- src/TypeCatalogGen/build.sh | 3 --- src/TypeCatalogGen/project.json | 25 +++++++++++++++---------- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/TypeCatalogGen/TypeCatalogGen.cs b/src/TypeCatalogGen/TypeCatalogGen.cs index 5aa7a44f4..893423c85 100644 --- a/src/TypeCatalogGen/TypeCatalogGen.cs +++ b/src/TypeCatalogGen/TypeCatalogGen.cs @@ -128,19 +128,19 @@ Usage: TypeCatalogGen.exe <{0}> <{1}> switch (hashAlgorithm) { case AssemblyHashAlgorithm.Sha1: - hashImpl = HashAlgorithm.Create("SHA1"); + hashImpl = SHA1.Create(); break; case AssemblyHashAlgorithm.MD5: - hashImpl = HashAlgorithm.Create("MD5"); + hashImpl = MD5.Create(); break; case AssemblyHashAlgorithm.Sha256: - hashImpl = HashAlgorithm.Create("SHA256"); + hashImpl = SHA256.Create(); break; case AssemblyHashAlgorithm.Sha384: - hashImpl = HashAlgorithm.Create("SHA384"); + hashImpl = SHA384.Create(); break; case AssemblyHashAlgorithm.Sha512: - hashImpl = HashAlgorithm.Create("SHA512"); + hashImpl = SHA512.Create(); break; default: throw new NotSupportedException(); diff --git a/src/TypeCatalogGen/build.sh b/src/TypeCatalogGen/build.sh index ad82b9133..45041b700 100755 --- a/src/TypeCatalogGen/build.sh +++ b/src/TypeCatalogGen/build.sh @@ -1,6 +1,3 @@ -. mono-snapshot mono -export DOTNET_REFERENCE_ASSEMBLIES_PATH=$MONO_PREFIX/lib/mono/xbuild-frameworks/ - pushd ../TypeCatalogParser dotnet restore -v Warning dotnet run diff --git a/src/TypeCatalogGen/project.json b/src/TypeCatalogGen/project.json index 00c3200d2..823abab5c 100644 --- a/src/TypeCatalogGen/project.json +++ b/src/TypeCatalogGen/project.json @@ -7,18 +7,23 @@ "emitEntryPoint": true }, - "dependencies": { - "System.Reflection.Metadata": "1.1.0", - "System.Collections.Immutable": "1.1.37" - }, - "frameworks": { - "net45": { - "frameworkAssemblies": { - "System.Runtime": "", - "System.IO": "", - "System.Reflection.Primitives": "" + "netcoreapp1.0": { + "dependencies": { + "Microsoft.NETCore.App": "1.0.0", + "System.Reflection.Metadata": "1.3.0", + "System.Collections.Immutable": "1.2.0" } } + }, + + "runtimes": { + "ubuntu.14.04-x64": { }, + "debian.8-x64": { }, + "centos.7-x64": { }, + "win7-x64": { }, + "win81-x64": { }, + "win10-x64": { }, + "osx.10.11-x64": { } } }