Deployment 使用AppVeyor部署.NET核心应用程序:文件被外部进程锁定(AppVeyor代理)
我正在尝试使用Appveyor代理在服务器上部署项目。然而,若在部署之前并没有重新启动或停止应用程序,那个么它就不能工作Deployment 使用AppVeyor部署.NET核心应用程序:文件被外部进程锁定(AppVeyor代理),deployment,appveyor,app-offline.htm,Deployment,Appveyor,App Offline.htm,我正在尝试使用Appveyor代理在服务器上部署项目。然而,若在部署之前并没有重新启动或停止应用程序,那个么它就不能工作 Web Deploy cannot modify the file 'TestProject.Application.dll' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may
Web Deploy cannot modify the file 'TestProject.Application.dll' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.
使用app_offline.htm文件是否有简单的方法?使用“app_offline”功能的appveyor.yml配置在这种环境下不起作用
我在“之前/之后”部分寻找一些东西。这是我的appveyor.yml:
version: '1.0.{build}'
os: Visual Studio 2015
install:
- "SET PATH=C:\\Program Files\\dotnet\\bin;%PATH%"
branches:
only:
- master
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
build_script:
- nuget sources add -name "VNext" -source https://dotnet.myget.org/F/cli-deps/api/v3/index.json
- nuget sources add -name "nugetv3" -source https://api.nuget.org/v3/index.json
- dotnet restore
- dotnet build */*/project.json
after_build:
- ps: Remove-Item -Path src\TestProject.Web\web.config
- ps: Move-Item -Path src\TestProject.Web\web.$env:APPVEYOR_REPO_BRANCH.config -Destination src\TestProject.Web\web.config
- dotnet publish src\TestProject.Web\ --output %appveyor_build_folder%\publish
artifacts:
- path: .\publish
name: TestProject.Web
test: off
deploy:
- provider: Environment
name: east-webhost
artifact: TestProject.Web
remove_files: false
on:
branch: master
请看。还要检查如何确保文件已发布
--伊利亚 我的before-deploy.ps1位于项目的根目录下,但它没有被执行,对此有何想法/deploy.ps1/src/TestProject.WebApp我将这个deploy.ps1作为“解决方案项”包含在我的解决方案中。仍然没有在服务器上执行任何操作。