diff --git a/eng/helix/content/mssql/InstallSqlServerLocalDB.ps1 b/eng/helix/content/mssql/InstallSqlServerLocalDB.ps1 index f4c5995f7027d95e57c216117d3604660740a78b..5af8fc5dac08a7774e2d83d4b4da4273cfa832cd 100644 --- a/eng/helix/content/mssql/InstallSqlServerLocalDB.ps1 +++ b/eng/helix/content/mssql/InstallSqlServerLocalDB.ps1 @@ -7,7 +7,9 @@ https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-2016-express-localdb?view=sql-server-2016 https://docs.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt?view=sql-server-2016 #> - +param( + [switch]$Force +) $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' # Workaround PowerShell/PowerShell#2138 Set-StrictMode -Version 1 @@ -15,6 +17,11 @@ Set-StrictMode -Version 1 $intermedateDir = "$PSScriptRoot\obj" mkdir $intermedateDir -ErrorAction Ignore | Out-Null +if (-not $Force -and (Test-Path 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\RefCount\SqlLocalDB13')) { + Write-Host "SQL Server 2016 Express LocalDB is already installed. Exiting without action. Call this script again with -Force to run the installation anyways." + exit 0 +} + Write-Host "Installing SQL Server 2016 Express LocalDB" -f Magenta # Download SqlLocalDB.msi. diff --git a/eng/targets/Helix.Common.props b/eng/targets/Helix.Common.props index 6f66e101d16157059e2e2bf063d561cc66c2cc82..f4cd02ece05f7f90999c0f2bb1075ba0822dc934 100644 --- a/eng/targets/Helix.Common.props +++ b/eng/targets/Helix.Common.props @@ -33,8 +33,7 @@ <HelixAvailableTargetQueue Include="Windows.10.Amd64.EnterpriseRS3.ASPNET.Open" Platform="Windows" /> <HelixAvailableTargetQueue Include="Windows.81.Amd64.Open" Platform="Windows" /> - <!-- Disabled until https://github.com/dotnet/core-eng/issues/5506 is resolved --> - <!-- <HelixAvailableTargetQueue Condition="'$(IsWindowsOnlyTest)' == 'true'" Include="Windows.7.Amd64.Open" /> --> + <HelixAvailableTargetQueue Include="Windows.7.Amd64.Open" Platform="Windows" /> <HelixContent Include="$(RepoRoot)src\Servers\IIS\tools\update_schema.ps1" /> <HelixContent Include="$(RepoRoot)src\Servers\IIS\tools\UpdateIISExpressCertificate.ps1" />