如何在FTP中使用AzureDevOps发布ASP.NET网站 [英] How to publish asp.net website using AzureDevOps in ftp

查看:59
本文介绍了如何在FTP中使用AzureDevOps发布ASP.NET网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望使用AzureDevOps作为我的CI/CD工具启用我的项目(asp.net api).
我希望将发布的文件通过FTP上传到我的托管服务提供商.

I want my project (asp.net api) to be enabled CI/CD using AzureDevOps as my CI/CD Tool.
I want my published files to uploaded to my hosting provider via FTP.

当前发生的情况是,当通过Azure DevOps构建产品时,它将产品创建为Msdeploy文件.我的托管服务提供商不支持通过ftp

Currently what happens is when build the product via Azure DevOps it create the application as Msdeploy file. which is not supported in my hosting provider via ftp

构建

构建工件

您看到的是Web部署格式的构建工件

As you see the build artifact which is in the format of the web deploy

发布尝试上传工件,即zip文件和ms部署文件.

Release trying to upload the artifact which is the zip files and ms deploy files.

上载文件后,服​​务器没有如何部署msdeploy项目文件.如何使用AzureDevOps部署网站

After uploading the file the server doesn't how to deploy the msdeploy project files. How can deploy a website using AzureDevOps

期望通过ftp上传的文件

我想将文件上传为ftp支持的常规文件,还是我想以自动化方式执行msdeploy

推荐答案

此方法的替代方法是配置Visual Studio Build任务以将生成工件作为文件而不是打包文件生成.

The workaround for this is to configure the Visual Studio Build task to generate your build artifacts as files instead of package.

Visual Studio Build 任务的默认 MSBuild Arguments 将把构建工件输出为压缩包,如上面发布的屏幕快照所示.

The default MSBuild Arguments of Visual Studio Build task will output the build artifacts as zipped package as shown in above screenshot you posted.

您可以尝试如下更改 MSBuild参数.此msbuild参数会将生成工件作为常规文件输出到文件夹$(build.artifactstagingdirectory)\.

You can try changing the MSBuild Arguments as below. This msbuild argument will output the build artifacts to folder $(build.artifactstagingdirectory)\ as regular files.

您可以通过FTP将文件发布到托管服务提供商.

The you can publish the files to your hosting provider via FTP.

/p:SkipInvalidConfigurations=true /p:DeployOnBuild=true /p:WebPublishMethod=FileSystem /p:publishUrl="$(build.artifactstagingdirectory)\\" /p:DeployDefaultTarget=WebPublish

这篇关于如何在FTP中使用AzureDevOps发布ASP.NET网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆