From b78d640abdad1470a8175fa966ce0efd97651fb9 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 4 Nov 2017 13:49:13 +0100 Subject: [PATCH] Make update-assemblyinfo.ps1 .NET 2.0 compatible and use (Get-Location).ToString().GetHashCode() as the object may change, but the string stays the same. --- BuildTools/update-assemblyinfo.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BuildTools/update-assemblyinfo.ps1 b/BuildTools/update-assemblyinfo.ps1 index 53ad2c33b..7d4c80342 100644 --- a/BuildTools/update-assemblyinfo.ps1 +++ b/BuildTools/update-assemblyinfo.ps1 @@ -60,7 +60,8 @@ $templateFiles = ( @{Input="ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec.template"; Output="ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec"}, @{Input="ILSpy/Properties/app.config.template"; Output = "ILSpy/app.config"} ); -[string]$mutexId = "ILSpyUpdateAssemblyInfo" + (Get-Location).GetHashCode(); +[string]$mutexId = "ILSpyUpdateAssemblyInfo" + (Get-Location).ToString().GetHashCode(); +Write-Host $mutexId; [bool]$createdNew = $false; $mutex = New-Object System.Threading.Mutex($true, $mutexId, [ref]$createdNew); try { @@ -123,5 +124,5 @@ try { } } finally { $mutex.ReleaseMutex(); - $mutex.Dispose(); + $mutex.Close(); } \ No newline at end of file