Visual Studio Code 發佈方式

透過工作命令

加入工作
{
                "label": "發行",
                "type": "process",
                "command": "發佈.bat",
                "args": [],
}

發佈.bat
dotnet build xxx\xxx.csproj -c Release -o xxx
copy app_offline.htm xxx
dotnet publish xxx\xxx.csproj -c Release -o xxx --no-build
del xxx\app_offline.htm
※app_offline.htm 會造成app pool 停止,但這樣複製檔案才能避免鎖定問題

執行工作 : 終端機 > 執行工作

留言

熱門文章