升级 3.6.2.1
Build / build (push) Canceled after 0s

增加basic.xml
This commit is contained in:
chfei committed 2026-10-27 12:01:19 +08:00
1 parent 5d81c475c8
commit b96b910bfc
29 files changed
+2420 -2102

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
param(
[string]$OutputPath = (Join-Path $PSScriptRoot '../artifacts/nuget')
)
$ErrorActionPreference = 'Stop'
$projectPath = Join-Path $PSScriptRoot '../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj'
$project = [xml](Get-Content -LiteralPath $projectPath -Raw)
$version = $project.Project.PropertyGroup.Version | Where-Object { $_ } | Select-Object -First 1
$frameworks = ($project.Project.PropertyGroup.TargetFrameworks | Where-Object { $_ } | Select-Object -First 1).Split(';')
# Pack the outer multi-target project; passing TargetFramework would produce an incomplete package.
dotnet pack $projectPath --configuration Release --output $OutputPath --nologo
if ($LASTEXITCODE -ne 0) { throw 'HandyControl packing failed.' }
Add-Type -AssemblyName System.IO.Compression.FileSystem
$packagePath = Join-Path $OutputPath "HandyControl.$version.nupkg"
$archive = [System.IO.Compression.ZipFile]::OpenRead((Resolve-Path -LiteralPath $packagePath).Path)
try {
$entries = @($archive.Entries.FullName)
foreach ($framework in $frameworks) {
$packageFramework = if ($framework -match '^net\d+\.\d+-windows$') { "$framework`7.0" } else { $framework }
if ("lib/$packageFramework/HandyControl.dll" -notin $entries) {
throw "Package is missing the assembly for $framework."
}
}
} finally {
$archive.Dispose()
}
Write-Host "Verified package: $packagePath"