diff --git a/Windows/CS/Framework4.0/Toprie/Toprie/Properties/AssemblyInfo.cs b/Windows/CS/Framework4.0/Toprie/Toprie/Properties/AssemblyInfo.cs
index 5aa5f70..312d5d7 100644
--- a/Windows/CS/Framework4.0/Toprie/Toprie/Properties/AssemblyInfo.cs
+++ b/Windows/CS/Framework4.0/Toprie/Toprie/Properties/AssemblyInfo.cs
@@ -33,6 +33,6 @@ using System.Runtime.InteropServices;
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.1")]
-[assembly: AssemblyFileVersion("1.0.0.1")]
+[assembly: AssemblyFileVersion("1.0.0.4")]
// NuGet包相关信息已在项目文件中配置
diff --git a/Windows/CS/Framework4.0/Toprie/Toprie/Toprie.csproj b/Windows/CS/Framework4.0/Toprie/Toprie/Toprie.csproj
index 821513c..baac102 100644
--- a/Windows/CS/Framework4.0/Toprie/Toprie/Toprie.csproj
+++ b/Windows/CS/Framework4.0/Toprie/Toprie/Toprie.csproj
@@ -42,14 +42,17 @@
DEBUG;TRACE
prompt
4
+ $(AssemblyName).xml
- pdbonly
+ true
+ full
true
bin\Release\
TRACE
prompt
4
+ $(OutputPath)$(AssemblyName).xml
diff --git a/Windows/CS/Framework4.0/Toprie/publish-nuget.ps1 b/Windows/CS/Framework4.0/Toprie/publish-nuget.ps1
index 34dd2b7..802a080 100644
--- a/Windows/CS/Framework4.0/Toprie/publish-nuget.ps1
+++ b/Windows/CS/Framework4.0/Toprie/publish-nuget.ps1
@@ -7,7 +7,6 @@ $output = Join-Path $scriptDir "Output"
$server = "http://47.111.181.23:8081/repository/nuget-releases/"
$key = "admin:admin"
$actualDllName = "JoyD.Windows.CS.Toprie.dll"
-$targetDllName = "Toprie.dll"
# 从AssemblyInfo.cs获取版本号
$assemblyInfoPath = "$scriptDir\Toprie\Properties\AssemblyInfo.cs"
@@ -62,24 +61,19 @@ if (!(Test-Path $output)) {
# 定义pdb和xml文件名称
$actualPdbName = $actualDllName -replace "\.dll$", ".pdb"
$actualXmlName = $actualDllName -replace "\.dll$", ".xml"
-$targetPdbName = $targetDllName -replace "\.dll$", ".pdb"
-$targetXmlName = $targetDllName -replace "\.dll$", ".xml"
# 清理之前的构建文件
Write-Host "清理之前的构建文件.."
if (Test-Path "$output\$actualDllName") { Remove-Item -Path "$output\$actualDllName" -Force }
if (Test-Path "$output\$actualPdbName") { Remove-Item -Path "$output\$actualPdbName" -Force }
if (Test-Path "$output\$actualXmlName") { Remove-Item -Path "$output\$actualXmlName" -Force }
-if (Test-Path "$output\$targetDllName") { Remove-Item -Path "$output\$targetDllName" -Force }
-if (Test-Path "$output\$targetPdbName") { Remove-Item -Path "$output\$targetPdbName" -Force }
-if (Test-Path "$output\$targetXmlName") { Remove-Item -Path "$output\$targetXmlName" -Force }
if (Test-Path "$output\$nupkgFileName") { Remove-Item -Path "$output\$nupkgFileName" -Force }
if (Test-Path "$output\$packageId.nuspec") { Remove-Item -Path "$output\$packageId.nuspec" -Force }
# 构建项目(确保生成pdb和xml文件)
Write-Host "1. 正在构建项目..."
Write-Host "当前目录: $scriptDir"
-dotnet build "$scriptDir\Toprie\Toprie.csproj" -c Release -o "$output" /p:DebugSymbols=true /p:DebugType=full /p:DocumentationFile=true
+dotnet build "$scriptDir\Toprie\Toprie.csproj" -c Release -o "$output" /p:DebugSymbols=true /p:DebugType=full /p:DocumentationFile=JoyD.Windows.CS.Toprie.xml
if ($LASTEXITCODE -ne 0) {
Write-Host "错误: 构建失败!" -ForegroundColor Red
@@ -92,20 +86,8 @@ if (!(Test-Path "$output\$actualDllName")) {
exit 1
}
-# 复制DLL并重命名用于打包
-Copy-Item -Path "$output\$actualDllName" -Destination "$output\$targetDllName" -Force
-Write-Host "已将 $actualDllName 复制并重命名为$targetDllName 用于打包"
-
-# 复制PDB和XML文件并重命名用于打包
-if (Test-Path "$output\$actualPdbName") {
- Copy-Item -Path "$output\$actualPdbName" -Destination "$output\$targetPdbName" -Force
- Write-Host "已将 $actualPdbName 复制并重命名为$targetPdbName 用于打包"
-}
-
-if (Test-Path "$output\$actualXmlName") {
- Copy-Item -Path "$output\$actualXmlName" -Destination "$output\$targetXmlName" -Force
- Write-Host "已将 $actualXmlName 复制并重命名为$targetXmlName 用于打包"
-}
+# 直接使用原始文件名,无需复制重命名
+Write-Host "使用原始文件名: $actualDllName"
# 复制图标文件到输出目录
if (Test-Path $iconSourcePath) {
@@ -174,9 +156,9 @@ $tempProjContent = @"
true
-
-
-
+
+
+
@@ -220,9 +202,9 @@ $nuspecContent = @"
-
-
-
+
+
+
@@ -247,22 +229,22 @@ if (!(Test-Path $libDir)) {
}
# 复制DLL到包结构中
-$sourceDllPath = Join-Path $output $targetDllName
-$destDllPath = Join-Path $libDir $targetDllName
+$sourceDllPath = Join-Path $output $actualDllName
+$destDllPath = Join-Path $libDir $actualDllName
Copy-Item -Path $sourceDllPath -Destination $destDllPath -Force
Write-Host "已复制$sourceDllPath 到$destDllPath"
# 复制PDB文件到包结构中
-$sourcePdbPath = Join-Path $output $targetPdbName
-$destPdbPath = Join-Path $libDir $targetPdbName
+$sourcePdbPath = Join-Path $output $actualPdbName
+$destPdbPath = Join-Path $libDir $actualPdbName
if (Test-Path $sourcePdbPath) {
Copy-Item -Path $sourcePdbPath -Destination $destPdbPath -Force
Write-Host "已复制$sourcePdbPath 到$destPdbPath"
}
# 复制XML文件到包结构中
-$sourceXmlPath = Join-Path $output $targetXmlName
-$destXmlPath = Join-Path $libDir $targetXmlName
+$sourceXmlPath = Join-Path $output $actualXmlName
+$destXmlPath = Join-Path $libDir $actualXmlName
if (Test-Path $sourceXmlPath) {
Copy-Item -Path $sourceXmlPath -Destination $destXmlPath -Force
Write-Host "已复制$sourceXmlPath 到$destXmlPath"