diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100644
index 0000000..d275006
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,60 @@
+trigger:
+ branches:
+ include:
+ - master
+ - rel/*
+ paths:
+ exclude:
+ - '**/*.md'
+
+pr:
+ branches:
+ include:
+ - master
+ - rel/*
+ paths:
+ exclude:
+ - '**/*.md'
+
+variables:
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
+
+stages:
+- stage: Build
+ jobs:
+ - job: Build
+ pool:
+ vmImage: windows-latest
+
+ variables:
+ BuildConfiguration: Release
+
+ steps:
+ - task: DotNetCoreCLI@2
+ inputs:
+ command: custom
+ custom: tool
+ arguments: install --tool-path . nbgv
+ displayName: Install NBGV tool
+
+ - script: nbgv cloud
+ displayName: Set Version
+
+ - task: UseDotNet@2
+ displayName: Use .NET Core 3.0.x SDK
+ inputs:
+ version: 3.0.x
+ performMultiLevelLookup: true
+
+ - task: DotNetCoreCLI@2
+ inputs:
+ command: pack
+ packagesToPack: src/StrongNamer/StrongNamer.csproj
+ configuration: $(BuildConfiguration)
+ packDirectory: $(Build.ArtifactStagingDirectory)\artifacts
+ nobuild: true
+ displayName: Pack StrongNamer
+
+ - publish: $(Build.ArtifactStagingDirectory)\artifacts
+ displayName: Publish build packages
+ artifact: BuildPackages
diff --git a/build/Build.tasks b/build/Build.tasks
deleted file mode 100644
index 664df05..0000000
--- a/build/Build.tasks
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/build/build.proj b/build/build.proj
deleted file mode 100644
index bb24f8d..0000000
--- a/build/build.proj
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
-
-
-
- Release
- $(MSBuildThisFileDirectory)\..
- $(RepoRoot)\output\$(Configuration)
-
-
-
- $(RepoRoot)\.nuget\
- $(NuGetDir)NuGet.exe
- https://dist.nuget.org/win-x86-commandline/v3.2.0/nuget.exe
- powershell -noprofile -nologo -command "(new-object System.Net.WebClient).DownloadFile('$(NugetDownloadURL)', '$(NugetExe)')"
-
- $(RepoRoot)\src\StrongNamer\bin\$(Configuration)
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
- 8
- 0
-
-
- $(MajorVersion).$(MinorVersion).$(Build).$(Revision)
- $(MajorVersion).$(MinorVersion).$(Build).$(Revision)
- $(MajorVersion).$(MinorVersion).$(Build)
-
-
-
-
- AssemblyVersion\("\d+\.\d+\.\d+\.\d+"\)
- AssemblyVersion("$(AssemblyVersion)")
-
-
- AssemblyFileVersion\("\d+\.\d+\.\d+\.\d+"\)
- AssemblyFileVersion("$(AssemblyFileVersion)")
-
-
-
-
- RestorePackages;UpdateVersion
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
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/common/StrongNamer.nuspec b/common/StrongNamer.nuspec
deleted file mode 100644
index 8b2da23..0000000
--- a/common/StrongNamer.nuspec
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
- StrongNamer
-
-
- 0.0.1
-
- Strong Namer - Automatically Add Strong Names to References
- Daniel Plaisted
- Daniel Plaisted
- https://github.com/dsplaisted/strongnamer/blob/master/LICENSE
- https://github.com/dsplaisted/strongnamer
- false
- Strong Namer will automatically add strong names to referenced assemblies which do not already have a strong name. This will allow you to reference and use NuGet packages with assemblies which are not strong named from your projects that do use a strong name.
- Strong Namer will automatically add strong names to referenced assemblies which do not already have a strong name.
- strongname strong name naming
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/StrongNamer/AddStrongName.cs b/src/StrongNamer/AddStrongName.cs
index 88ec1a5..22364cb 100644
--- a/src/StrongNamer/AddStrongName.cs
+++ b/src/StrongNamer/AddStrongName.cs
@@ -1,6 +1,7 @@
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Mono.Cecil;
+using Mono.Security.Cryptography;
using System;
using System.Collections.Generic;
using System.IO;
@@ -57,11 +58,7 @@ public override bool Execute()
return false;
}
- StrongNameKeyPair key;
- using (var keyStream = File.OpenRead(KeyFile.ItemSpec))
- {
- key = new StrongNameKeyPair(keyStream);
- }
+ var keyBytes = File.ReadAllBytes(KeyFile.ItemSpec);
SignedAssembliesToReference = new ITaskItem[Assemblies.Length];
@@ -71,7 +68,7 @@ public override bool Execute()
{
for (int i = 0; i < Assemblies.Length; i++)
{
- SignedAssembliesToReference[i] = ProcessAssembly(Assemblies[i], key, resolver);
+ SignedAssembliesToReference[i] = ProcessAssembly(Assemblies[i], keyBytes, resolver);
if (SignedAssembliesToReference[i].ItemSpec != Assemblies[i].ItemSpec)
{
// Path was updated to signed version
@@ -101,7 +98,7 @@ public override bool Execute()
return true;
}
- ITaskItem ProcessAssembly(ITaskItem assemblyItem, StrongNameKeyPair key, StrongNamerAssemblyResolver resolver)
+ ITaskItem ProcessAssembly(ITaskItem assemblyItem, byte[] keyBytes, StrongNamerAssemblyResolver resolver)
{
string signedAssemblyFolder = Path.GetFullPath(SignedAssemblyFolder.ItemSpec);
if (!Directory.Exists(signedAssemblyFolder))
@@ -158,13 +155,16 @@ ITaskItem ProcessAssembly(ITaskItem assemblyItem, StrongNameKeyPair key, StrongN
return assemblyItem;
}
- var token = GetKeyTokenFromKey(key.PublicKey);
+
+ var publicKey = GetPublicKey(keyBytes);
+
+ var token = GetKeyTokenFromKey(publicKey);
string formattedKeyToken = BitConverter.ToString(token).Replace("-", "");
Log.LogMessage(MessageImportance.Low, $"Signing assembly {assembly.FullName} with key with token {formattedKeyToken}");
- assembly.Name.HashAlgorithm = AssemblyHashAlgorithm.SHA1;
- assembly.Name.PublicKey = key.PublicKey;
+ assembly.Name.HashAlgorithm = Mono.Cecil.AssemblyHashAlgorithm.SHA1;
+ assembly.Name.PublicKey = publicKey;
assembly.Name.HasPublicKey = true;
assembly.Name.Attributes &= AssemblyAttributes.PublicKey;
@@ -174,7 +174,7 @@ ITaskItem ProcessAssembly(ITaskItem assemblyItem, StrongNameKeyPair key, StrongN
Log.LogMessage(MessageImportance.Low, $"Updating reference in assembly {assembly.FullName} to {reference.FullName} to use token {formattedKeyToken}");
}
- string fullPublicKey = BitConverter.ToString(key.PublicKey).Replace("-", "");
+ string fullPublicKey = BitConverter.ToString(publicKey).Replace("-", "");
var internalsVisibleToAttributes = assembly.CustomAttributes.Where(att => att.AttributeType.FullName == typeof(System.Runtime.CompilerServices.InternalsVisibleToAttribute).FullName).ToList();
foreach (var internalsVisibleToAttribute in internalsVisibleToAttributes)
@@ -190,8 +190,8 @@ ITaskItem ProcessAssembly(ITaskItem assemblyItem, StrongNameKeyPair key, StrongN
try
{
assembly.Write(assemblyOutputPath, new WriterParameters()
- {
- StrongNameKeyPair = key
+ {
+ StrongNameKeyBlob = keyBytes
});
}
catch (Exception ex)
@@ -217,5 +217,40 @@ private static byte[] GetKeyTokenFromKey(byte[] fullKey)
return hash.Reverse().Take(8).ToArray();
}
+
+ // From Cecil
+ // https://github.com/jbevain/cecil/pull/548/files
+ static RSA CreateRSA(byte[] blob)
+ {
+ if (blob == null)
+ throw new ArgumentNullException("blob");
+
+
+ return CryptoConvert.FromCapiKeyBlob(blob);
+ }
+
+ // https://github.com/atykhyy/cecil/blob/291a779d473e9c88e597e2c9f86e47e23b49be1e/Mono.Security.Cryptography/CryptoService.cs
+ public static byte[] GetPublicKey(byte[] keyBlob)
+ {
+ using var rsa = CreateRSA(keyBlob);
+
+ var cspBlob = CryptoConvert.ToCapiPublicKeyBlob(rsa);
+ var publicKey = new byte[12 + cspBlob.Length];
+ Buffer.BlockCopy(cspBlob, 0, publicKey, 12, cspBlob.Length);
+ // The first 12 bytes are documented at:
+ // http://msdn.microsoft.com/library/en-us/cprefadd/html/grfungethashfromfile.asp
+ // ALG_ID - Signature
+ publicKey[1] = 36;
+ // ALG_ID - Hash
+ publicKey[4] = 4;
+ publicKey[5] = 128;
+ // Length of Public Key (in bytes)
+ publicKey[8] = (byte)(cspBlob.Length >> 0);
+ publicKey[9] = (byte)(cspBlob.Length >> 8);
+ publicKey[10] = (byte)(cspBlob.Length >> 16);
+ publicKey[11] = (byte)(cspBlob.Length >> 24);
+ return publicKey;
+ }
+
}
}
diff --git a/src/StrongNamer/CryptoConvert.cs b/src/StrongNamer/CryptoConvert.cs
new file mode 100644
index 0000000..769ac1d
--- /dev/null
+++ b/src/StrongNamer/CryptoConvert.cs
@@ -0,0 +1,308 @@
+//
+// CryptoConvert.cs - Crypto Convertion Routines
+//
+// Author:
+// Sebastien Pouliot
+//
+// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
+// Copyright (C) 2004-2006 Novell Inc. (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Security.Cryptography;
+
+namespace Mono.Security.Cryptography
+{
+
+ static class CryptoConvert
+ {
+
+ static private int ToInt32LE(byte[] bytes, int offset)
+ {
+ return (bytes[offset + 3] << 24) | (bytes[offset + 2] << 16) | (bytes[offset + 1] << 8) | bytes[offset];
+ }
+
+ static private uint ToUInt32LE(byte[] bytes, int offset)
+ {
+ return (uint)((bytes[offset + 3] << 24) | (bytes[offset + 2] << 16) | (bytes[offset + 1] << 8) | bytes[offset]);
+ }
+
+ static private byte[] GetBytesLE(int val)
+ {
+ return new byte[] {
+ (byte) (val & 0xff),
+ (byte) ((val >> 8) & 0xff),
+ (byte) ((val >> 16) & 0xff),
+ (byte) ((val >> 24) & 0xff)
+ };
+ }
+
+ static private byte[] Trim(byte[] array)
+ {
+ for (int i = 0; i < array.Length; i++)
+ {
+ if (array[i] != 0x00)
+ {
+ byte[] result = new byte[array.Length - i];
+ Buffer.BlockCopy(array, i, result, 0, result.Length);
+ return result;
+ }
+ }
+ return null;
+ }
+
+ static RSA FromCapiPrivateKeyBlob(byte[] blob, int offset)
+ {
+ RSAParameters rsap = new RSAParameters();
+ try
+ {
+ if ((blob[offset] != 0x07) || // PRIVATEKEYBLOB (0x07)
+ (blob[offset + 1] != 0x02) || // Version (0x02)
+ (blob[offset + 2] != 0x00) || // Reserved (word)
+ (blob[offset + 3] != 0x00) ||
+ (ToUInt32LE(blob, offset + 8) != 0x32415352)) // DWORD magic = RSA2
+ throw new CryptographicException("Invalid blob header");
+
+ // ALGID (CALG_RSA_SIGN, CALG_RSA_KEYX, ...)
+ // int algId = ToInt32LE (blob, offset+4);
+
+ // DWORD bitlen
+ int bitLen = ToInt32LE(blob, offset + 12);
+
+ // DWORD public exponent
+ byte[] exp = new byte[4];
+ Buffer.BlockCopy(blob, offset + 16, exp, 0, 4);
+ Array.Reverse(exp);
+ rsap.Exponent = Trim(exp);
+
+ int pos = offset + 20;
+ // BYTE modulus[rsapubkey.bitlen/8];
+ int byteLen = (bitLen >> 3);
+ rsap.Modulus = new byte[byteLen];
+ Buffer.BlockCopy(blob, pos, rsap.Modulus, 0, byteLen);
+ Array.Reverse(rsap.Modulus);
+ pos += byteLen;
+
+ // BYTE prime1[rsapubkey.bitlen/16];
+ int byteHalfLen = (byteLen >> 1);
+ rsap.P = new byte[byteHalfLen];
+ Buffer.BlockCopy(blob, pos, rsap.P, 0, byteHalfLen);
+ Array.Reverse(rsap.P);
+ pos += byteHalfLen;
+
+ // BYTE prime2[rsapubkey.bitlen/16];
+ rsap.Q = new byte[byteHalfLen];
+ Buffer.BlockCopy(blob, pos, rsap.Q, 0, byteHalfLen);
+ Array.Reverse(rsap.Q);
+ pos += byteHalfLen;
+
+ // BYTE exponent1[rsapubkey.bitlen/16];
+ rsap.DP = new byte[byteHalfLen];
+ Buffer.BlockCopy(blob, pos, rsap.DP, 0, byteHalfLen);
+ Array.Reverse(rsap.DP);
+ pos += byteHalfLen;
+
+ // BYTE exponent2[rsapubkey.bitlen/16];
+ rsap.DQ = new byte[byteHalfLen];
+ Buffer.BlockCopy(blob, pos, rsap.DQ, 0, byteHalfLen);
+ Array.Reverse(rsap.DQ);
+ pos += byteHalfLen;
+
+ // BYTE coefficient[rsapubkey.bitlen/16];
+ rsap.InverseQ = new byte[byteHalfLen];
+ Buffer.BlockCopy(blob, pos, rsap.InverseQ, 0, byteHalfLen);
+ Array.Reverse(rsap.InverseQ);
+ pos += byteHalfLen;
+
+ // ok, this is hackish but CryptoAPI support it so...
+ // note: only works because CRT is used by default
+ // http://bugzilla.ximian.com/show_bug.cgi?id=57941
+ rsap.D = new byte[byteLen]; // must be allocated
+ if (pos + byteLen + offset <= blob.Length)
+ {
+ // BYTE privateExponent[rsapubkey.bitlen/8];
+ Buffer.BlockCopy(blob, pos, rsap.D, 0, byteLen);
+ Array.Reverse(rsap.D);
+ }
+ }
+ catch (Exception e)
+ {
+ throw new CryptographicException("Invalid blob.", e);
+ }
+
+ RSA rsa = null;
+ try
+ {
+ rsa = RSA.Create();
+ rsa.ImportParameters(rsap);
+ }
+ catch (CryptographicException)
+ {
+ // this may cause problem when this code is run under
+ // the SYSTEM identity on Windows (e.g. ASP.NET). See
+ // http://bugzilla.ximian.com/show_bug.cgi?id=77559
+ bool throws = false;
+ try
+ {
+ CspParameters csp = new CspParameters();
+ csp.Flags = CspProviderFlags.UseMachineKeyStore;
+ rsa = new RSACryptoServiceProvider(csp);
+ rsa.ImportParameters(rsap);
+ }
+ catch
+ {
+ throws = true;
+ }
+
+ if (throws)
+ {
+ // rethrow original, not the latter, exception if this fails
+ throw;
+ }
+ }
+ return rsa;
+ }
+
+ static RSA FromCapiPublicKeyBlob(byte[] blob, int offset)
+ {
+ try
+ {
+ if ((blob[offset] != 0x06) || // PUBLICKEYBLOB (0x06)
+ (blob[offset + 1] != 0x02) || // Version (0x02)
+ (blob[offset + 2] != 0x00) || // Reserved (word)
+ (blob[offset + 3] != 0x00) ||
+ (ToUInt32LE(blob, offset + 8) != 0x31415352)) // DWORD magic = RSA1
+ throw new CryptographicException("Invalid blob header");
+
+ // ALGID (CALG_RSA_SIGN, CALG_RSA_KEYX, ...)
+ // int algId = ToInt32LE (blob, offset+4);
+
+ // DWORD bitlen
+ int bitLen = ToInt32LE(blob, offset + 12);
+
+ // DWORD public exponent
+ RSAParameters rsap = new RSAParameters();
+ rsap.Exponent = new byte[3];
+ rsap.Exponent[0] = blob[offset + 18];
+ rsap.Exponent[1] = blob[offset + 17];
+ rsap.Exponent[2] = blob[offset + 16];
+
+ int pos = offset + 20;
+ // BYTE modulus[rsapubkey.bitlen/8];
+ int byteLen = (bitLen >> 3);
+ rsap.Modulus = new byte[byteLen];
+ Buffer.BlockCopy(blob, pos, rsap.Modulus, 0, byteLen);
+ Array.Reverse(rsap.Modulus);
+
+ RSA rsa = null;
+ try
+ {
+ rsa = RSA.Create();
+ rsa.ImportParameters(rsap);
+ }
+ catch (CryptographicException)
+ {
+ // this may cause problem when this code is run under
+ // the SYSTEM identity on Windows (e.g. ASP.NET). See
+ // http://bugzilla.ximian.com/show_bug.cgi?id=77559
+ CspParameters csp = new CspParameters();
+ csp.Flags = CspProviderFlags.UseMachineKeyStore;
+ rsa = new RSACryptoServiceProvider(csp);
+ rsa.ImportParameters(rsap);
+ }
+ return rsa;
+ }
+ catch (Exception e)
+ {
+ throw new CryptographicException("Invalid blob.", e);
+ }
+ }
+
+ // PRIVATEKEYBLOB
+ // PUBLICKEYBLOB
+ static public RSA FromCapiKeyBlob(byte[] blob)
+ {
+ return FromCapiKeyBlob(blob, 0);
+ }
+
+ static public RSA FromCapiKeyBlob(byte[] blob, int offset)
+ {
+ if (blob == null)
+ throw new ArgumentNullException("blob");
+ if (offset >= blob.Length)
+ throw new ArgumentException("blob is too small.");
+
+ switch (blob[offset])
+ {
+ case 0x00:
+ // this could be a public key inside an header
+ // like "sn -e" would produce
+ if (blob[offset + 12] == 0x06)
+ {
+ return FromCapiPublicKeyBlob(blob, offset + 12);
+ }
+ break;
+ case 0x06:
+ return FromCapiPublicKeyBlob(blob, offset);
+ case 0x07:
+ return FromCapiPrivateKeyBlob(blob, offset);
+ }
+ throw new CryptographicException("Unknown blob format.");
+ }
+
+ static public byte[] ToCapiPublicKeyBlob(RSA rsa)
+ {
+ RSAParameters p = rsa.ExportParameters(false);
+ int keyLength = p.Modulus.Length; // in bytes
+ byte[] blob = new byte[20 + keyLength];
+
+ blob[0] = 0x06; // Type - PUBLICKEYBLOB (0x06)
+ blob[1] = 0x02; // Version - Always CUR_BLOB_VERSION (0x02)
+ // [2], [3] // RESERVED - Always 0
+ blob[5] = 0x24; // ALGID - Always 00 24 00 00 (for CALG_RSA_SIGN)
+ blob[8] = 0x52; // Magic - RSA1 (ASCII in hex)
+ blob[9] = 0x53;
+ blob[10] = 0x41;
+ blob[11] = 0x31;
+
+ byte[] bitlen = GetBytesLE(keyLength << 3);
+ blob[12] = bitlen[0]; // bitlen
+ blob[13] = bitlen[1];
+ blob[14] = bitlen[2];
+ blob[15] = bitlen[3];
+
+ // public exponent (DWORD)
+ int pos = 16;
+ int n = p.Exponent.Length;
+ while (n > 0)
+ blob[pos++] = p.Exponent[--n];
+ // modulus
+ pos = 20;
+ byte[] part = p.Modulus;
+ int len = part.Length;
+ Array.Reverse(part, 0, len);
+ Buffer.BlockCopy(part, 0, blob, pos, len);
+ pos += len;
+ return blob;
+ }
+ }
+}
\ No newline at end of file
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..7861f9f 100644
--- a/src/StrongNamer/StrongNamer.csproj
+++ b/src/StrongNamer/StrongNamer.csproj
@@ -1,72 +1,49 @@
-
-
-
+
- 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
+ net461;netcoreapp2.1
+ SharedKey.snk
+ true
+ true
+ Daniel Plaisted
+ Strong Namer - Automatically Add Strong Names to References
+ https://github.com/dsplaisted/strongnamer
+
+
+ strongname strong name naming
+ Strong Namer will automatically add strong names to referenced assemblies which do not already have a strong name.
+ Strong Namer will automatically add strong names to referenced assemblies which do not already have a strong name. This will allow you to reference and use NuGet packages with assemblies which are not strong named from your projects that do use a strong name.
+
+ build
+ $(NoWarn);NU5128
+
+ 0.11.0
+ latest
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
- Properties\CommonAssemblyInfo.cs
-
-
-
-
+
+
+
+
-
-
- PreserveNewest
-
-
- PreserveNewest
- Designer
-
+
+
-
-
-
\ No newline at end of file
+
diff --git a/src/StrongNamer/StrongNamer.targets b/src/StrongNamer/StrongNamer.targets
index f6859a0..51addaf 100644
--- a/src/StrongNamer/StrongNamer.targets
+++ b/src/StrongNamer/StrongNamer.targets
@@ -1,13 +1,30 @@
-
-
-
+
+
+
+ $(MSBuildProjectDirectory)\obj\$(Configuration)\
+ $(MSBuildThisFileDirectory)netcoreapp2.1\StrongNamer.dll
+ $(MSBuildThisFileDirectory)net461\StrongNamer.dll
+
+ 2.1
+
+ $(BundledNETCoreAppTargetFrameworkVersion)
+ 1.0
+
+
+
+
+
+
- $(MSBuildThisFileDirectory)SharedKey.snk
+ $(MSBuildThisFileDirectory)SharedKey.snk
-
-
-
\ 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
diff --git a/src/TestConsoleApp/Properties/AssemblyInfo.cs b/src/TestConsoleApp/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2c94ec0..0000000
--- a/src/TestConsoleApp/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("TestConsoleApp")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("TestConsoleApp")]
-[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("2f57f75b-02a7-44de-b49f-5ca81546af9b")]
-
-// 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/src/TestConsoleApp/TestConsoleApp.csproj b/src/TestConsoleApp/TestConsoleApp.csproj
index fe06548..164f40f 100644
--- a/src/TestConsoleApp/TestConsoleApp.csproj
+++ b/src/TestConsoleApp/TestConsoleApp.csproj
@@ -1,66 +1,11 @@
-
-
-
+
- Debug
- AnyCPU
- {2F57F75B-02A7-44DE-B49F-5CA81546AF9B}
+ net461
Exe
- Properties
- TestConsoleApp
- TestConsoleApp
- v4.5.2
- 512
- true
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {2823f067-39ed-4fe1-96c4-72c93a68db8e}
- TestLibrary
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/src/TestLibrary/Properties/AssemblyInfo.cs b/src/TestLibrary/Properties/AssemblyInfo.cs
deleted file mode 100644
index dd260ca..0000000
--- a/src/TestLibrary/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("TestLibrary")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("TestLibrary")]
-[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("2823f067-39ed-4fe1-96c4-72c93a68db8e")]
-
-// 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/src/TestLibrary/TestLibrary.csproj b/src/TestLibrary/TestLibrary.csproj
index 5a86040..17c72db 100644
--- a/src/TestLibrary/TestLibrary.csproj
+++ b/src/TestLibrary/TestLibrary.csproj
@@ -1,69 +1,13 @@
-
-
-
-
- Debug
- AnyCPU
- {2823F067-39ED-4FE1-96C4-72C93A68DB8E}
- Library
- Properties
- TestLibrary
- TestLibrary
- v4.5.2
- 512
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
+
+ net461
true
-
-
SharedKey.snk
+
-
- ..\..\packages\Octokit.0.16.0\lib\net45\Octokit.dll
- True
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
+
+
\ No newline at end of file
diff --git a/src/TestLibrary/packages.config b/src/TestLibrary/packages.config
deleted file mode 100644
index 514d542..0000000
--- a/src/TestLibrary/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/version.json b/version.json
new file mode 100644
index 0000000..95e7240
--- /dev/null
+++ b/version.json
@@ -0,0 +1,10 @@
+{
+ "version": "0.1",
+ "publicReleaseRefSpec": [
+ "^refs/heads/master$", // we release out of master
+ "^refs/heads/rel/v\\d+\\.\\d+" // we also release branches starting with rel/vN.N
+ ],
+ "nugetPackageVersion":{
+ "semVer": 2
+ }
+}