@@ -44,9 +44,23 @@ $script:X64Assemblies = @(
4444 ' Microsoft.SqlServer.Rmo'
4545)
4646
47- # Add x64-only assemblies if on 64-bit system
47+ # Add x64-only assemblies if on 64-bit system and Windows
4848if ($env: PROCESSOR_ARCHITECTURE -ne " x86" ) {
49- $script :CoreAssemblies += $script :X64Assemblies
49+ # Determine platform for replication assembly filtering
50+ $currentPlatform = if ($PSVersionTable.PSVersion.Major -ge 6 ) {
51+ if ($IsWindows ) { ' Windows' }
52+ elseif ($IsLinux ) { ' Linux' }
53+ else { ' OSX' }
54+ } else {
55+ ' Windows' # PowerShell 5.1 and below only runs on Windows
56+ }
57+
58+ if ($currentPlatform -eq ' Windows' ) {
59+ $script :CoreAssemblies += $script :X64Assemblies
60+ } else {
61+ # On non-Windows platforms, only add Rmo (skip Replication)
62+ $script :CoreAssemblies += ' Microsoft.SqlServer.Rmo'
63+ }
5064}
5165
5266# Add Analysis Services assemblies if running under DSC
@@ -107,12 +121,23 @@ if ($PSVersionTable.PSEdition -ne "Core") {
107121 $script :AssemblyLoadOrder += ' Microsoft.SqlServer.Management.IntegrationServices'
108122}
109123
110- # Add x64-only assemblies if on 64-bit system
124+ # Add x64-only assemblies if on 64-bit system and Windows
111125if ($env: PROCESSOR_ARCHITECTURE -ne " x86" ) {
112- $script :AssemblyLoadOrder += @ (
113- ' Microsoft.SqlServer.Replication' ,
114- ' Microsoft.SqlServer.Rmo'
115- )
126+ # Determine platform for replication assembly filtering
127+ $currentPlatform = if ($PSVersionTable.PSVersion.Major -ge 6 ) {
128+ if ($IsWindows ) { ' Windows' }
129+ elseif ($IsLinux ) { ' Linux' }
130+ else { ' OSX' }
131+ } else {
132+ ' Windows' # PowerShell 5.1 and below only runs on Windows
133+ }
134+
135+ if ($currentPlatform -eq ' Windows' ) {
136+ $script :AssemblyLoadOrder += @ (
137+ ' Microsoft.SqlServer.Replication' ,
138+ ' Microsoft.SqlServer.Rmo'
139+ )
140+ }
116141}
117142
118143# Add Analysis Services assemblies to load order if running under DSC
@@ -198,21 +223,37 @@ $script:PlatformAssemblies = @{
198223 ' Path' = Join-Path $script :libraryroot " lib/core/runtimes/unix/lib/net6.0"
199224 ' NativePath' = Join-Path $script :libraryroot " lib/core/runtimes/linux-x64/native"
200225 ' Dependencies' = Join-Path $script :libraryroot " lib/core/runtimes/unix/lib/net6.0"
226+ ' ThirdParty' = @ {
227+ ' Bogus' = Join-Path $script :libraryroot " lib/third-party/bogus/core"
228+ ' LumenWorks.Framework.IO' = Join-Path $script :libraryroot " lib/third-party/LumenWorks/core"
229+ }
201230 }
202231 ' arm' = @ {
203232 ' Path' = Join-Path $script :libraryroot " lib/core/runtimes/unix/lib/net6.0"
204233 ' NativePath' = Join-Path $script :libraryroot " lib/core/runtimes/linux-arm/native"
205234 ' Dependencies' = Join-Path $script :libraryroot " lib/core/runtimes/unix/lib/net6.0"
235+ ' ThirdParty' = @ {
236+ ' Bogus' = Join-Path $script :libraryroot " lib/third-party/bogus/core"
237+ ' LumenWorks.Framework.IO' = Join-Path $script :libraryroot " lib/third-party/LumenWorks/core"
238+ }
206239 }
207240 ' arm64' = @ {
208241 ' Path' = Join-Path $script :libraryroot " lib/core/runtimes/unix/lib/net6.0"
209242 ' NativePath' = Join-Path $script :libraryroot " lib/core/runtimes/linux-arm64/native"
210243 ' Dependencies' = Join-Path $script :libraryroot " lib/core/runtimes/unix/lib/net6.0"
244+ ' ThirdParty' = @ {
245+ ' Bogus' = Join-Path $script :libraryroot " lib/third-party/bogus/core"
246+ ' LumenWorks.Framework.IO' = Join-Path $script :libraryroot " lib/third-party/LumenWorks/core"
247+ }
211248 }
212249 ' musl-x64' = @ {
213250 ' Path' = Join-Path $script :libraryroot " lib/core/runtimes/unix/lib/net6.0"
214251 ' NativePath' = Join-Path $script :libraryroot " lib/core/runtimes/linux-musl-x64/native"
215252 ' Dependencies' = Join-Path $script :libraryroot " lib/core/runtimes/unix/lib/net6.0"
253+ ' ThirdParty' = @ {
254+ ' Bogus' = Join-Path $script :libraryroot " lib/third-party/bogus/core"
255+ ' LumenWorks.Framework.IO' = Join-Path $script :libraryroot " lib/third-party/LumenWorks/core"
256+ }
216257 }
217258 ' DAC' = Join-Path $script :libraryroot " lib/linux-dac"
218259 }
@@ -221,6 +262,10 @@ $script:PlatformAssemblies = @{
221262 ' Path' = Join-Path $script :libraryroot " lib/core/runtimes/unix/lib/net6.0"
222263 ' NativePath' = Join-Path $script :libraryroot " lib/core/runtimes/osx/native"
223264 ' Dependencies' = Join-Path $script :libraryroot " lib/core/runtimes/unix/lib/net6.0"
265+ ' ThirdParty' = @ {
266+ ' Bogus' = Join-Path $script :libraryroot " lib/third-party/bogus/core"
267+ ' LumenWorks.Framework.IO' = Join-Path $script :libraryroot " lib/third-party/LumenWorks/core"
268+ }
224269 }
225270 ' DAC' = Join-Path $script :libraryroot " lib/mac-dac"
226271 }
0 commit comments