@@ -52,8 +52,8 @@ Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/LumenWorksCsvReader
5252Invoke-WebRequest - Uri https:// github.com / spaghettidba/ XESmartTarget/ releases/ download/ v1.5.7 / XESmartTarget_x64.msi - OutFile .\temp\XESmartTarget_x64.msi
5353
5454$ProgressPreference = " Continue"
55- 7z x .\temp\LumenWorksCsvReader.zip " -o.\temp\LumenWorksCsvReader"
56- 7z x .\temp\bogus.zip " -o.\temp\bogus"
55+ 7z x - y .\temp\LumenWorksCsvReader.zip " -o.\temp\LumenWorksCsvReader"
56+ 7z x - y .\temp\bogus.zip " -o.\temp\bogus"
5757
5858msiexec / a $ (Resolve-Path .\temp\DacFramework.msi) / qb TARGETDIR= $ (Resolve-Path .\temp\dacfull)
5959Start-Sleep 3
@@ -67,6 +67,7 @@ Get-ChildItem "./temp/bogus/*/net40/bogus.dll" -Recurse | Copy-Item -Destination
6767
6868Copy-Item .\temp\LumenWorksCsvReader\lib\net461\LumenWorks.Framework.IO.dll - Destination ./ third- party/ LumenWorks/ LumenWorks.Framework.IO.dll
6969
70+ <#
7071Register-PackageSource -provider NuGet -name nugetRepository -Location https://www.nuget.org/api/v2 -Trusted -ErrorAction Ignore
7172
7273$parms = @{
@@ -78,14 +79,6 @@ $parms = @{
7879 SkipDependencies = $true
7980}
8081
81- $parms.Name = " Microsoft.Data.SqlClient"
82- $parms.RequiredVersion = " 6.0.1"
83- $null = Install-Package @parms
84-
85- $parms.Name = " Microsoft.Data.SqlClient.SNI.runtime"
86- $parms.RequiredVersion = " 5.2.0"
87- $null = Install-Package @parms
88-
8982$parms.Name = "Microsoft.Identity.Client"
9083$parms.RequiredVersion = "4.70.0"
9184$null = Install-Package @parms
@@ -98,41 +91,20 @@ $parms.Name = "Azure.Core"
9891$parms.RequiredVersion = "1.38.0"
9992$null = Install-Package @parms
10093
101- # Ensure Microsoft.Data.SqlClient.dll is properly copied
102- $sqlClientPath = " $tempdir \nuget\Microsoft.Data.SqlClient.6.0.1\lib\net462\Microsoft.Data.SqlClient.dll"
103- if (Test-Path $sqlClientPath ) {
104- Copy-Item $sqlClientPath - Destination lib/ - Force
105- } else {
106- # Try alternative paths
107- $sqlClientPath = Get-ChildItem - Path " $tempdir \nuget\Microsoft.Data.SqlClient.6.0.1" - Recurse - Include " Microsoft.Data.SqlClient.dll" |
108- Where-Object { $_.FullName -like " *\net*\*" } |
109- Select-Object - First 1
110-
111- if ($sqlClientPath ) {
112- Copy-Item $sqlClientPath.FullName - Destination lib/ - Force
113- } else {
114- Write-Error " Could not find Microsoft.Data.SqlClient.dll in NuGet package"
115- exit 1
116- }
117- }
118-
119-
120-
12194Copy-Item "$tempdir\nuget\Microsoft.Identity.Client.4.70.0\lib\net472\Microsoft.Identity.Client.dll" -Destination lib/
12295Copy-Item "$tempdir\nuget\Microsoft.Data.SqlClient.SNI.runtime.5.2.0\runtimes\win-x64\native\Microsoft.Data.SqlClient.SNI.dll" -Destination lib/
12396Copy-Item "$tempdir\nuget\Azure.Core.1.38.0\lib\net472\Azure.Core.dll" -Destination lib/
12497Copy-Item "$tempdir\nuget\Microsoft.IdentityModel.Abstractions.8.3.1\lib\net472\Microsoft.IdentityModel.Abstractions.dll" -Destination lib/
98+ #>
12599
126-
127-
128- Copy-Item " ./var/misc/core/*.dll" - Destination ./ lib/
100+ Copy-Item " ./var/misc/desktop/*.dll" - Destination ./ lib/
129101Copy-Item " ./var/misc/both/*.dll" - Destination ./ lib/
130102Copy-Item " ./var/third-party-licenses" - Destination ./ - Recurse
131103
132104Remove-Item - Path lib/* .xml - Recurse - ErrorAction Ignore
133105Remove-Item - Path lib/* .pdb - Recurse - ErrorAction Ignore
134106
135- Get-ChildItem - Directory - Path .\lib\ | Where-Object Name -notin ' x64' , ' x86' | Remove-Item - Recurse
107+ # Get-ChildItem -Directory -Path .\lib\ | Where-Object Name -notin 'x64', 'x86' | Remove-Item -Recurse
136108
137109# Remove existing gallery location if it exists
138110if ((Test-Path - Path C:\gallery\dbatools.library)) {
@@ -145,16 +117,22 @@ $null = New-Item -ItemType Directory -Path C:\gallery\dbatools.library\desktop -
145117$null = New-Item - ItemType Directory - Path C:\gallery\dbatools.library\desktop\lib - Force
146118
147119# Copy module files and other content
148- $null = robocopy c:\github\dbatools.library C:\gallery\dbatools.library / S / XF actions- build.ps1 .markdownlint.json * .psproj* * .git* * .yml * .md dac.ps1 build* .ps1 dbatools- core* .* / XD .git .github Tests .vscode project temp runtime runtimes replication var opt
120+ $null = robocopy c:\github\dbatools.library C:\gallery\dbatools.library / S / XF actions- build.ps1 .markdownlint.json * .psproj* * .git* * .yml * .md dac.ps1 build* .ps1 dbatools- core* .* / XD .git .github Tests .vscode project temp runtime runtimes replication var opt lib third - party
149121
150122# Clean up and copy module files
151123Remove-Item c:\gallery\dbatools.library\dac.ps1 - ErrorAction Ignore
152124Remove-Item c:\gallery\dbatools.library\dbatools.core.library.psd1 - ErrorAction Ignore
153125Copy-Item C:\github\dbatools.library\dbatools.library.psd1 C:\gallery\dbatools.library - Force
154126
155127# Move third-party and lib directories to desktop folder
156- Move-Item C:\github\dbatools.library\third- party C:\gallery\dbatools.library\desktop\third- party - Force
157- Move-Item C:\github\dbatools.library\lib C:\gallery\dbatools.library\desktop\lib - Force
128+ if (Test-Path C:\gallery\dbatools.library\desktop\lib) {
129+ Remove-Item C:\gallery\dbatools.library\desktop\lib - Recurse - Force
130+ }
131+ if (Test-Path C:\gallery\dbatools.library\desktop\third- party) {
132+ Remove-Item C:\gallery\dbatools.library\desktop\third- party - Recurse - Force
133+ }
134+ Move-Item C:\github\dbatools.library\third- party C:\gallery\dbatools.library\desktop\ - Force
135+ Move-Item C:\github\dbatools.library\lib C:\gallery\dbatools.library\desktop\ - Force
158136
159137# $null = Get-ChildItem -Recurse -Path C:\gallery\dbatools.library\*.ps*, C:\gallery\dbatools.library\dbatools.dll | Set-AuthenticodeSignature -Certificate (Get-ChildItem -Path Cert:\CurrentUser\My\1c735258e8b34ce113ad86a501235c1f2e263106) -TimestampServer http://timestamp.digicert.com -HashAlgorithm SHA256
160138
@@ -163,6 +141,7 @@ $requiredFiles = @(
163141 " C:\gallery\dbatools.library\dbatools.library.psd1" ,
164142 " C:\gallery\dbatools.library\dbatools.library.psm1" ,
165143 " C:\gallery\dbatools.library\desktop\lib\Microsoft.Data.SqlClient.dll" ,
144+ # "C:\gallery\dbatools.library\lib\Microsoft.Data.SqlClient.dll",
166145 " C:\gallery\dbatools.library\desktop\lib\Microsoft.SqlServer.Smo.dll" ,
167146 " C:\gallery\dbatools.library\desktop\lib\Microsoft.Identity.Client.dll"
168147)
@@ -174,6 +153,8 @@ foreach ($file in $requiredFiles) {
174153 }
175154}
176155
156+ Get-ChildItem C:\github\dbatools.library\var \misc\desktop | Copy-Item - Destination C:\gallery\dbatools.library\desktop\lib - Force
157+ Get-ChildItem C:\github\dbatools.library\var \misc\both | Copy-Item - Destination C:\gallery\dbatools.library\desktop\lib - Force
177158Import-Module C:\gallery\dbatools.library\dbatools.library.psd1 - Force
178159
179160Pop-Location
0 commit comments