Browse Source

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.

pull/925/merge
Siegfried Pammer 8 years ago
parent
commit
b78d640abd
  1. 5
      BuildTools/update-assemblyinfo.ps1

5
BuildTools/update-assemblyinfo.ps1

@ -60,7 +60,8 @@ $templateFiles = (
@{Input="ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec.template"; Output="ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec"}, @{Input="ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec.template"; Output="ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec"},
@{Input="ILSpy/Properties/app.config.template"; Output = "ILSpy/app.config"} @{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; [bool]$createdNew = $false;
$mutex = New-Object System.Threading.Mutex($true, $mutexId, [ref]$createdNew); $mutex = New-Object System.Threading.Mutex($true, $mutexId, [ref]$createdNew);
try { try {
@ -123,5 +124,5 @@ try {
} }
} finally { } finally {
$mutex.ReleaseMutex(); $mutex.ReleaseMutex();
$mutex.Dispose(); $mutex.Close();
} }
Loading…
Cancel
Save