From fdc11811a39aca51ffa9add7fd25c3417f082be6 Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Sun, 31 Dec 2023 22:02:41 +0100 Subject: [PATCH] Fix build task --- build.yaml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/build.yaml b/build.yaml index 5ea27919e7..5ffb2c895f 100644 --- a/build.yaml +++ b/build.yaml @@ -42,14 +42,16 @@ BuildWorkflow: Check_SqlServer_Availability: | { - try - { - [Microsoft.SqlServer.Management.Smo.Server] -as [Type] | Out-Null - } - catch - { - throw 'The SqlServer types are not available. Please install the SqlServer module or load SMO stubs types and try again.' - } + Import-Module -Name SqlServer -ErrorAction 'SilentlyContinue' + + try + { + [Microsoft.SqlServer.Management.Smo.Server] -as [Type] | Out-Null + } + catch + { + throw 'The SqlServer types are not available. Please install the SqlServer module or load SMO stubs types and try again.' + } } Package_WikContent: |