diff --git a/Windows/CS/Framework4.0/CubeLib/CubeLib/Properties/AssemblyInfo.cs b/Windows/CS/Framework4.0/CubeLib/CubeLib/Properties/AssemblyInfo.cs index e2c0241..6243249 100644 --- a/Windows/CS/Framework4.0/CubeLib/CubeLib/Properties/AssemblyInfo.cs +++ b/Windows/CS/Framework4.0/CubeLib/CubeLib/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 //通过使用 "*",如下所示: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.1.2")] -[assembly: AssemblyFileVersion("1.0.1.2")] +[assembly: AssemblyVersion("1.0.1.3")] +[assembly: AssemblyFileVersion("1.0.1.5")] diff --git a/Windows/CS/Framework4.0/CubeLib/publish-nuget.ps1 b/Windows/CS/Framework4.0/CubeLib/publish-nuget.ps1 index 77ffb39..0dc3321 100644 --- a/Windows/CS/Framework4.0/CubeLib/publish-nuget.ps1 +++ b/Windows/CS/Framework4.0/CubeLib/publish-nuget.ps1 @@ -209,16 +209,19 @@ $nuspecContent = @" + - + + + @@ -257,13 +260,88 @@ if (Test-Path $sourcePdbPath) { Write-Host "已复制$sourcePdbPath 到$destPdbPath" } -# 复制xml文件到包结构中 +# 生成XML文档文件 $targetXmlName = [System.IO.Path]::ChangeExtension($targetDllName, ".xml") $sourceXmlPath = Join-Path $output $targetXmlName + +# 初始化binDir变量 +$binDir = Join-Path $scriptDir "CubeLib\bin\$configuration" + +# 尝试从bin目录复制XML文件 +$binXmlPath = Join-Path $binDir $targetXmlName +if (Test-Path $binXmlPath) { + Copy-Item -Path $binXmlPath -Destination $sourceXmlPath -Force + Write-Host "Copied $binXmlPath to $sourceXmlPath" +} +else { + # 如果bin目录中没有xml文件,尝试生成一个包含文档注释的xml文件 + $xmlContent = @' + + + + JoyD.Windows.CS.CubeLib + + + + + WebSocket客户端接口 + + + + + WebSocket客户端实现 + + + + + WebSocket服务器接口 + + + + + WebSocket服务器实现 + + + + +'@ + Set-Content -Path $sourceXmlPath -Value $xmlContent -Encoding UTF8 + Write-Host "Created XML documentation file with basic comments at $sourceXmlPath" +} + +# 移除重复的复制逻辑 + $destXmlPath = Join-Path $libDir $targetXmlName if (Test-Path $sourceXmlPath) { Copy-Item -Path $sourceXmlPath -Destination $destXmlPath -Force - Write-Host "已复制$sourceXmlPath 到$destXmlPath" + Write-Host "已复制 $sourceXmlPath 到 $destXmlPath" +} + +# 复制websocket-sharp.dll到包结构中 +$webSocketSharpDll = "websocket-sharp.dll" +$sourceWebSocketSharpPath = Join-Path $output $webSocketSharpDll +$destWebSocketSharpPath = Join-Path $libDir $webSocketSharpDll +if (Test-Path $sourceWebSocketSharpPath) { + Copy-Item -Path $sourceWebSocketSharpPath -Destination $destWebSocketSharpPath -Force + Write-Host "已复制$sourceWebSocketSharpPath 到$destWebSocketSharpPath" +} + +# 复制websocket-sharp.pdb到包结构中 +$webSocketSharpPdb = "websocket-sharp.pdb" +$sourceWebSocketSharpPdbPath = Join-Path $output $webSocketSharpPdb +$destWebSocketSharpPdbPath = Join-Path $libDir $webSocketSharpPdb +if (Test-Path $sourceWebSocketSharpPdbPath) { + Copy-Item -Path $sourceWebSocketSharpPdbPath -Destination $destWebSocketSharpPdbPath -Force + Write-Host "已复制$sourceWebSocketSharpPdbPath 到$destWebSocketSharpPdbPath" +} + +# 复制websocket-sharp.xml到包结构中 +$webSocketSharpXml = "websocket-sharp.xml" +$sourceWebSocketSharpXmlPath = Join-Path $output $webSocketSharpXml +$destWebSocketSharpXmlPath = Join-Path $libDir $webSocketSharpXml +if (Test-Path $sourceWebSocketSharpXmlPath) { + Copy-Item -Path $sourceWebSocketSharpXmlPath -Destination $destWebSocketSharpXmlPath -Force + Write-Host "已复制$sourceWebSocketSharpXmlPath 到$destWebSocketSharpXmlPath" } # 复制图标文件到包结构根目录