修复部署脚本:移除--no-restore并在项目文件中添加RuntimeIdentifier

main
821644@qq.com 3 weeks ago
parent de0252efe2
commit 7b90fafb9c

@ -4,6 +4,8 @@
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

@ -123,8 +123,7 @@ function Build-Api {
-c Release ` -c Release `
-r $Runtime ` -r $Runtime `
--self-contained $SelfContained ` --self-contained $SelfContained `
-o $ApiDir ` -o $ApiDir
--no-restore
if ($LASTEXITCODE -ne 0) { if ($LASTEXITCODE -ne 0) {
Write-Error "后端 API 构建失败" Write-Error "后端 API 构建失败"

Loading…
Cancel
Save