From 010b2e91bc532e6fd119e9f5e6c851f90874e43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Del=20Rinc=C3=B3n=20L=C3=B3pez?= Date: Wed, 26 Sep 2018 14:00:46 +0200 Subject: [PATCH] Port StrongNamer to a .NET Standard MSBuild task. --- common/CommonAssemblyInfo.cs | 32 ----- src/StrongNamer/Properties/AssemblyInfo.cs | 6 - src/StrongNamer/StrongNamer.csproj | 113 ++++++++---------- src/StrongNamer/{ => build}/SharedKey.snk | Bin src/StrongNamer/build/StrongNamer.props | 7 ++ .../{ => build}/StrongNamer.targets | 18 +-- .../buildMultiTargeting/StrongNamer.props | 7 ++ src/StrongNamer/packages.config | 4 - src/StrongNamer/project.json | 13 -- 9 files changed, 75 insertions(+), 125 deletions(-) delete mode 100644 common/CommonAssemblyInfo.cs delete mode 100644 src/StrongNamer/Properties/AssemblyInfo.cs rename src/StrongNamer/{ => build}/SharedKey.snk (100%) create mode 100644 src/StrongNamer/build/StrongNamer.props rename src/StrongNamer/{ => build}/StrongNamer.targets (69%) create mode 100644 src/StrongNamer/buildMultiTargeting/StrongNamer.props delete mode 100644 src/StrongNamer/packages.config delete mode 100644 src/StrongNamer/project.json diff --git a/common/CommonAssemblyInfo.cs b/common/CommonAssemblyInfo.cs deleted file mode 100644 index a6b664a..0000000 --- a/common/CommonAssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Resources; -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("PCLStorage")] -//[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("StrongNamer")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: NeutralResourcesLanguage("en")] - -// 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.*")] - -// No need to manually update this, build process does it automatically -[assembly: AssemblyVersion("0.0.8.0")] -[assembly: AssemblyFileVersion("0.0.8.0")] diff --git a/src/StrongNamer/Properties/AssemblyInfo.cs b/src/StrongNamer/Properties/AssemblyInfo.cs deleted file mode 100644 index 30f9fc5..0000000 --- a/src/StrongNamer/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,6 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("StrongNamer")] -[assembly: AssemblyDescription("")] \ No newline at end of file diff --git a/src/StrongNamer/StrongNamer.csproj b/src/StrongNamer/StrongNamer.csproj index ce35dbf..7e271a1 100644 --- a/src/StrongNamer/StrongNamer.csproj +++ b/src/StrongNamer/StrongNamer.csproj @@ -1,72 +1,59 @@ - - - + + - Debug - AnyCPU - {3BED6CCE-6803-448D-90D7-86EB9699CEA7} - Library - Properties - StrongNamer - StrongNamer - v4.5.2 - 512 - win-any - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + netstandard2.0;net461 + + netstandard2.0 + $(MSBuildThisFileDirectory)..\..\artifacts\ + + true + + tasks + + 0.0.8 + build$([System.DateTime]::Now.ToString('yyyyMMdd-HHmm')) + - - - - - - - - - - - + + PreserveNewest + + + + PreserveNewest + + - - Properties\CommonAssemblyInfo.cs - - - - + + + + + + - - - PreserveNewest - - - PreserveNewest - Designer - + - - - \ No newline at end of file + + <_PackageFiles Include="bin\$(Configuration)\**\Mono.Cecil.dll"> + tasks\netstandard2.0\Mono.Cecil.dll + false + Content + + <_PackageFiles Include="bin\$(Configuration)\**\Mono.Cecil.dll"> + tasks\net461\Mono.Cecil.dll + false + Content + + + + + diff --git a/src/StrongNamer/SharedKey.snk b/src/StrongNamer/build/SharedKey.snk similarity index 100% rename from src/StrongNamer/SharedKey.snk rename to src/StrongNamer/build/SharedKey.snk diff --git a/src/StrongNamer/build/StrongNamer.props b/src/StrongNamer/build/StrongNamer.props new file mode 100644 index 0000000..06c4d34 --- /dev/null +++ b/src/StrongNamer/build/StrongNamer.props @@ -0,0 +1,7 @@ + + + + diff --git a/src/StrongNamer/StrongNamer.targets b/src/StrongNamer/build/StrongNamer.targets similarity index 69% rename from src/StrongNamer/StrongNamer.targets rename to src/StrongNamer/build/StrongNamer.targets index f6859a0..2482939 100644 --- a/src/StrongNamer/StrongNamer.targets +++ b/src/StrongNamer/build/StrongNamer.targets @@ -1,13 +1,20 @@ - - + + + + netstandard2.0 + net461 + $(MSBuildThisFileDirectory)..\tasks\$(TaskFolder)\StrongNamer.dll + + + - $(MSBuildThisFileDirectory)SharedKey.snk + $(MSBuildThisFileDirectory)SharedKey.snk - @@ -28,11 +34,9 @@ - $(ResolveReferencesDependsOn);StrongNamerTarget - - + \ No newline at end of file diff --git a/src/StrongNamer/buildMultiTargeting/StrongNamer.props b/src/StrongNamer/buildMultiTargeting/StrongNamer.props new file mode 100644 index 0000000..1faea04 --- /dev/null +++ b/src/StrongNamer/buildMultiTargeting/StrongNamer.props @@ -0,0 +1,7 @@ + + + + diff --git a/src/StrongNamer/packages.config b/src/StrongNamer/packages.config deleted file mode 100644 index e304cab..0000000 --- a/src/StrongNamer/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/StrongNamer/project.json b/src/StrongNamer/project.json deleted file mode 100644 index 5f48ce5..0000000 --- a/src/StrongNamer/project.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "dependencies": { - "Mono.Cecil": "0.10.0" - }, - "frameworks": { - "net452": { - "dependencies": {} - } - }, - "runtimes": { - "win-any": {} - } -} \ No newline at end of file