From 330a4ce1596333a3c2f0f824e0e58728651f8a53 Mon Sep 17 00:00:00 2001 From: Werner van Deventer Date: Tue, 2 Nov 2021 13:00:52 +0200 Subject: [PATCH] Fix issues #38 and tested #44. Update version numbers. Ignore delay signed assemblies that simply throw exception. Fix password field not being disabled in the UI. Update packages. --- README.md | 10 +++++----- .../Program.cs | 6 +++++- .../Properties/AssemblyInfo.cs | 4 ++-- .../StrongNameSigner.iss | 2 +- .../StrongNameSigner.nuspec | 8 ++++++-- .../Brutal.Dev.StrongNameSigner.Tests.csproj | 11 +++++----- .../packages.config | 4 ++-- .../MainForm.cs | 9 +++++++-- .../Properties/AssemblyInfo.cs | 4 ++-- .../Brutal.Dev.StrongNameSigner.csproj | 18 ++++++++--------- .../Properties/AssemblyInfo.cs | 4 ++-- .../SigningHelper.cs | 20 ++++++++++++++----- .../packages.config | 2 +- 13 files changed, 62 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index b80fa84..a7c70bd 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ If you are making use of the [NuGet package](https://www.nuget.org/packages/Brut ```xml + Command=""..\packages\Brutal.Dev.StrongNameSigner.2.9.0\build\StrongNameSigner.Console.exe" -in "..\packages"" /> ``` @@ -57,7 +57,7 @@ To add multiple directories to process at the same time (similar to how the UI c ```xml + Command=""..\packages\Brutal.Dev.StrongNameSigner.2.9.0\build\StrongNameSigner.Console.exe" -in "..\packages\elmah.corelibrary.1.2.2|..\packages\Elmah.MVC.2.9.0"" /> ``` @@ -69,7 +69,7 @@ You can also use wildcards for each of your input directories. The above example ```xml + Command=""..\packages\Brutal.Dev.StrongNameSigner.2.9.0\build\StrongNameSigner.Console.exe" -in "..\packages\elmah.*"" /> ``` @@ -78,7 +78,7 @@ Wildcards can also be complex and placed anywhere in the path. This is useful if ```xml + Command=""..\packages\Brutal.Dev.StrongNameSigner.2.9.0\build\StrongNameSigner.Console.exe" -in "..\packages\Microsoft.*.Security*\*\net45"" /> ``` @@ -104,7 +104,7 @@ For example, ServiceStack's PostgreSQL NuGet package is not signed but other dep ```xml + Command=""..\packages\Brutal.Dev.StrongNameSigner.2.9.0\build\StrongNameSigner.Console.exe" -in "..\packages\ServiceStack.OrmLite.PostgreSQL.4.0.40\lib\net40|..\packages\ServiceStack.Text.Signed.4.0.40\lib\net40|..\packages\ServiceStack.OrmLite.Signed.4.0.40"" /> ``` diff --git a/src/Brutal.Dev.StrongNameSigner.Console/Program.cs b/src/Brutal.Dev.StrongNameSigner.Console/Program.cs index dba8d9b..b0e34e9 100644 --- a/src/Brutal.Dev.StrongNameSigner.Console/Program.cs +++ b/src/Brutal.Dev.StrongNameSigner.Console/Program.cs @@ -215,7 +215,11 @@ private static AssemblyInfo SignSingleAssembly(string assemblyPath, string keyPa var oldInfo = SigningHelper.GetAssemblyInfo(assemblyPath); var newInfo = SigningHelper.SignAssembly(assemblyPath, keyPath, outputDirectory, password, probingPaths); - if (!oldInfo.IsSigned && newInfo.IsSigned) + if (newInfo.SigningType == StrongNameType.DelaySigned) + { + PrintMessage("Delay-signed assembly signing is not supported yet...", LogLevel.Verbose); + } + else if (!oldInfo.IsSigned && newInfo.IsSigned) { PrintMessageColor(string.Format("'{0}' was strong-name signed successfully.", newInfo.FilePath), LogLevel.Changes, ConsoleColor.Green); diff --git a/src/Brutal.Dev.StrongNameSigner.Console/Properties/AssemblyInfo.cs b/src/Brutal.Dev.StrongNameSigner.Console/Properties/AssemblyInfo.cs index 6db694a..224d305 100644 --- a/src/Brutal.Dev.StrongNameSigner.Console/Properties/AssemblyInfo.cs +++ b/src/Brutal.Dev.StrongNameSigner.Console/Properties/AssemblyInfo.cs @@ -33,5 +33,5 @@ // 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("2.8.0.0")] -[assembly: AssemblyFileVersion("2.8.0.0")] +[assembly: AssemblyVersion("2.9.0.0")] +[assembly: AssemblyFileVersion("2.9.0.0")] diff --git a/src/Brutal.Dev.StrongNameSigner.Setup/StrongNameSigner.iss b/src/Brutal.Dev.StrongNameSigner.Setup/StrongNameSigner.iss index e0a32f1..f4701ee 100644 --- a/src/Brutal.Dev.StrongNameSigner.Setup/StrongNameSigner.iss +++ b/src/Brutal.Dev.StrongNameSigner.Setup/StrongNameSigner.iss @@ -4,7 +4,7 @@ #define MyAppID "{A89C23E7-A764-4F59-8EF3-5AB0A33E5849}" #define MyAppName ".NET Assembly Strong-Name Signer" #define MyAppNameNoSpaces "StrongNameSigner" -#define MyAppVersion "2.8.0.0" +#define MyAppVersion "2.9.0.0" #define MyAppPublisher "BrutalDev" #define MyAppURL "https://github.com/brutaldev/StrongNameSigner" #define MyAppExeName "StrongNameSigner.exe" diff --git a/src/Brutal.Dev.StrongNameSigner.Setup/StrongNameSigner.nuspec b/src/Brutal.Dev.StrongNameSigner.Setup/StrongNameSigner.nuspec index dc3e5b3..36417a9 100644 --- a/src/Brutal.Dev.StrongNameSigner.Setup/StrongNameSigner.nuspec +++ b/src/Brutal.Dev.StrongNameSigner.Setup/StrongNameSigner.nuspec @@ -2,7 +2,7 @@ Brutal.Dev.StrongNameSigner - 2.8.0 + 2.9.0 .NET Assembly Strong-Name Signer Werner van Deventer Werner van Deventer @@ -21,7 +21,11 @@ The tool will also re-write the assembly references (as well as any InternalsVis Automatic strong-name signing of referenced assemblies. Utility software to strong-name sign .NET assemblies, including assemblies you do not have the source code for. - Update to the latest Mono Cecil which fixes a number of issues that can only make things better. -- Fix null reference error when signing ReferenceAssemblyAnnotator (issue #62). +- Fix issues #38 and tested #44. +- Update version numbers. +- Ignore delay signed assemblies that simply throw exception. +- Fix password field not being disabled in the UI. +- Update packages. Werner van Deventer (https://brutaldev.com) en-US diff --git a/src/Brutal.Dev.StrongNameSigner.Tests/Brutal.Dev.StrongNameSigner.Tests.csproj b/src/Brutal.Dev.StrongNameSigner.Tests/Brutal.Dev.StrongNameSigner.Tests.csproj index 863fe6f..33903dd 100644 --- a/src/Brutal.Dev.StrongNameSigner.Tests/Brutal.Dev.StrongNameSigner.Tests.csproj +++ b/src/Brutal.Dev.StrongNameSigner.Tests/Brutal.Dev.StrongNameSigner.Tests.csproj @@ -1,8 +1,7 @@  + - - Debug AnyCPU @@ -55,6 +54,9 @@ ..\..\packages\NUnit.3.13.2\lib\net40\nunit.framework.dll True + + ..\..\packages\Shouldly.3.0.2\lib\net40\Shouldly.dll + 3.5 @@ -197,12 +199,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + -