Skip to content

Commit e03adad

Browse files
fixing
1 parent 6d155cc commit e03adad

5 files changed

Lines changed: 31 additions & 41 deletions

File tree

build/build-core.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ Get-ChildItem "./temp/xe/*.dll" -Recurse | Copy-Item -Destination third-party/XE
105105
Get-ChildItem "./temp/dacfull/" -Include *.dll, *.exe, *.config -Recurse | Copy-Item -Destination ./lib/win
106106
Get-ChildItem "./temp/bogus/*/net6.0/bogus.dll" -Recurse | Copy-Item -Destination ./third-party/bogus/bogus.dll
107107
Copy-Item ./temp/LumenWorksCsvReader/lib/netstandard2.0/LumenWorks.Framework.IO.dll -Destination ./third-party/LumenWorks/LumenWorks.Framework.IO.dll
108-
108+
return
109+
<#
109110
Register-PackageSource -provider NuGet -name nugetRepository -Location https://www.nuget.org/api/v2 -Trusted -ErrorAction Ignore
110111
111112
$parms = @{
@@ -161,7 +162,7 @@ Copy-Item "$tempdir/nuget/Azure.Core.1.38.0/lib/net6.0/Azure.Core.dll" -Destinat
161162
Copy-Item "$tempdir/nuget/Microsoft.IdentityModel.Abstractions.8.3.1/lib/net8.0/Microsoft.IdentityModel.Abstractions.dll" -Destination lib/
162163
Copy-Item "$tempdir/nuget/System.Text.Json.8.0.5/lib/net8.0/System.Text.Json.dll" -Destination lib/
163164
Copy-Item "$tempdir/nuget/Microsoft.Bcl.AsyncInterfaces.9.0.3/lib/netstandard2.1/Microsoft.Bcl.AsyncInterfaces.dll" -Destination lib/
164-
165+
#>
165166
Copy-Item ./temp/linux/* -Destination lib -Exclude (Get-ChildItem lib -Recurse) -Recurse -Include *.exe, *.config -Verbose
166167

167168
Copy-Item "./var/misc/core/*.dll" -Destination ./lib/

build/build-full.ps1

Lines changed: 18 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/LumenWorksCsvReader
5252
Invoke-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

5858
msiexec /a $(Resolve-Path .\temp\DacFramework.msi) /qb TARGETDIR=$(Resolve-Path .\temp\dacfull)
5959
Start-Sleep 3
@@ -67,6 +67,7 @@ Get-ChildItem "./temp/bogus/*/net40/bogus.dll" -Recurse | Copy-Item -Destination
6767

6868
Copy-Item .\temp\LumenWorksCsvReader\lib\net461\LumenWorks.Framework.IO.dll -Destination ./third-party/LumenWorks/LumenWorks.Framework.IO.dll
6969

70+
<#
7071
Register-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-
12194
Copy-Item "$tempdir\nuget\Microsoft.Identity.Client.4.70.0\lib\net472\Microsoft.Identity.Client.dll" -Destination lib/
12295
Copy-Item "$tempdir\nuget\Microsoft.Data.SqlClient.SNI.runtime.5.2.0\runtimes\win-x64\native\Microsoft.Data.SqlClient.SNI.dll" -Destination lib/
12396
Copy-Item "$tempdir\nuget\Azure.Core.1.38.0\lib\net472\Azure.Core.dll" -Destination lib/
12497
Copy-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/
129101
Copy-Item "./var/misc/both/*.dll" -Destination ./lib/
130102
Copy-Item "./var/third-party-licenses" -Destination ./ -Recurse
131103

132104
Remove-Item -Path lib/*.xml -Recurse -ErrorAction Ignore
133105
Remove-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
138110
if ((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
151123
Remove-Item c:\gallery\dbatools.library\dac.ps1 -ErrorAction Ignore
152124
Remove-Item c:\gallery\dbatools.library\dbatools.core.library.psd1 -ErrorAction Ignore
153125
Copy-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
177158
Import-Module C:\gallery\dbatools.library\dbatools.library.psd1 -Force
178159

179160
Pop-Location

dbatools.library.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
@{
99
# Version number of this module.
10-
ModuleVersion = '2025.3.20'
10+
ModuleVersion = '2025.3.29'
1111

1212
# ID used to uniquely identify this module
1313
GUID = '00b61a37-6c36-40d8-8865-ac0180288c84'

dbatools.library.psm1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ if ($PSVersionTable.PSEdition -ne "Core") {
3434
{
3535
string[] dlls = {
3636
"System.Memory",
37+
"Microsoft.Bcl.AsyncInterfaces",
38+
"System.Text.Json",
3739
"System.Runtime.CompilerServices.Unsafe",
3840
"System.Resources.Extensions",
3941
"Microsoft.SqlServer.ConnectionInfo",
@@ -48,7 +50,8 @@ if ($PSVersionTable.PSEdition -ne "Core") {
4850
"Microsoft.SqlServer.Management.IntegrationServices",
4951
"Microsoft.SqlServer.Replication",
5052
"Microsoft.SqlServer.Rmo",
51-
"System.Private.CoreLib"
53+
"System.Private.CoreLib",
54+
"Azure.Core"
5255
};
5356
5457
var name = new AssemblyName(e.Name);

project/dbatools/dbatools.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@
4242
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
4343
</PropertyGroup>
4444
<ItemGroup>
45+
<PackageReference Include="Azure.Core" Version="1.45.0" />
46+
<PackageReference Include="Azure.Identity" Version="1.13.2" />
47+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.3" />
4548
<PackageReference Include="Microsoft.Identity.Client" Version="4.70.0" />
49+
<PackageReference Include="Microsoft.IdentityModel.Abstractions" Version="8.7.0" />
4650
<PackageReference Include="System.Resources.Extensions" Version="9.0.3" />
51+
<PackageReference Include="System.Text.Json" Version="9.0.3" />
4752
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="9.0.3" />
4853
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.1" />
4954
<PackageReference Include="Microsoft.SqlServer.SqlManagementObjects" Version="172.64.0" />

0 commit comments

Comments
 (0)