diff --git a/src/Brutal.Dev.StrongNameSigner.Tests/SignAssemblyTests.cs b/src/Brutal.Dev.StrongNameSigner.Tests/SignAssemblyTests.cs index 25ea014..26263f4 100644 --- a/src/Brutal.Dev.StrongNameSigner.Tests/SignAssemblyTests.cs +++ b/src/Brutal.Dev.StrongNameSigner.Tests/SignAssemblyTests.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Security.Cryptography; +using System.Threading.Tasks; using Shouldly; using Xunit; @@ -264,5 +265,14 @@ public void SignAssembly_InPlaceWithoutPdb_Should_Succeed() Directory.Delete(tempDir, true); } } + + [Fact] + public void SignAssembly_InParralel_Should_Succeed() + { + Parallel.Invoke( + SignAssembly_Public_API_Test, + SignAssembly_Should_Reassemble_NET_45_Assembly_Correctly + ); + } } } diff --git a/src/Brutal.Dev.StrongNameSigner/SigningHelper.cs b/src/Brutal.Dev.StrongNameSigner/SigningHelper.cs index 8b5db12..99acc80 100644 --- a/src/Brutal.Dev.StrongNameSigner/SigningHelper.cs +++ b/src/Brutal.Dev.StrongNameSigner/SigningHelper.cs @@ -203,7 +203,7 @@ public static void SignAssemblies(IEnumerable assemblyInput // File locking issues in Mono.Cecil are a real pain in the ass so let's create a working directory of files to process, then copy them back when we're done. var tempFilePathToInputOutputFilePairMap = new Dictionary(); - var tempPath = Path.Combine(Path.GetTempPath(), "StrongNameSigner"); + var tempPath = Path.Combine(Path.GetTempPath(), "StrongNameSigner-" + Guid.NewGuid().ToString()); Directory.CreateDirectory(tempPath); foreach (var inputOutpuFilePair in assemblyInputOutputPaths)