diff --git a/Windows/CS/Framework4.0/Toprie/publish-nuget.ps1 b/Windows/CS/Framework4.0/Toprie/publish-nuget.ps1 index 23bd38b..88c98f2 100644 --- a/Windows/CS/Framework4.0/Toprie/publish-nuget.ps1 +++ b/Windows/CS/Framework4.0/Toprie/publish-nuget.ps1 @@ -161,6 +161,16 @@ $contentTypesPath = Join-Path $tempDir "[Content_Types].xml" Set-Content -LiteralPath $contentTypesPath -Value "" Write-Host "已在 $contentTypesPath 创建[Content_Types].xml" +# 复制nuspec文件到包结构根目录 +$sourceNuspecPath = Join-Path $output "$packageId.nuspec" +$destNuspecPath = Join-Path $tempDir "$packageId.nuspec" +if (Test-Path $sourceNuspecPath) { + Copy-Item -Path $sourceNuspecPath -Destination $destNuspecPath -Force + Write-Host "已复制nuspec文件到包结构: $destNuspecPath" +} else { + Write-Host "警告: 找不到nuspec文件 $sourceNuspecPath" -ForegroundColor Yellow +} + # 创建zip文件并将其重命名为nupkg $zipPath = Join-Path $output "temp_manual.zip"