Skip to content

Commit

Permalink
Merge pull request #780 from diadoc/strong-name-fix
Browse files Browse the repository at this point in the history
netstandard strong name sign fix
  • Loading branch information
Capucinimo authored Jan 18, 2021
2 parents fe97e7e + a33ea7f commit 20f5def
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#tool "nuget:?package=ILRepack.MSBuild.Task&version=2.0.13"
#tool "nuget:?package=protobuf-net&version=1.0.0.280"
#tool "nuget:?package=secure-file&version=1.0.31"
#tool "nuget:?package=Brutal.Dev.StrongNameSigner&version=2.7.1"
#addin "nuget:?package=Cake.StrongNameSigner&version=0.1.0"
using Cake.Common.Diagnostics;
using Cake.Git;
using System.Text.RegularExpressions;
Expand Down Expand Up @@ -207,6 +209,7 @@ Task("Repack")
WorkingDirectory = outputDir.Combine(targetFramework),
Libs = new [] { sourceDir.Combine(targetFramework) }.ToList(),
Keyfile = signWithKeyFile,
DelaySign = true
};

CreateDirectory(outputDir.Combine(targetFramework));
Expand All @@ -215,6 +218,12 @@ Task("Repack")
sourceDir.Combine(targetFramework).CombineWithFilePath("DiadocApi.dll"),
new FilePath[] { sourceDir.Combine(targetFramework).CombineWithFilePath("protobuf-net.dll") },
ilRepackSettings);

StrongNameSigner(new StrongNameSignerSettings {
AssemblyFile = outputDir.Combine(targetFramework).CombineWithFilePath("DiadocApi.dll"),
KeyFile = signWithKeyFile
});
DeleteFiles(GetFiles(outputDir.Combine(targetFramework).FullPath + "/*.unsigned"));
}
});

Expand Down

0 comments on commit 20f5def

Please sign in to comment.