How to publish asp.net website using AzureDevOps in ftp

早过忘川 提交于 2020-12-13 11:28:37

问题


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.

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

Build

Build Artifact

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

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

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

expected files to be uploaded in ftp

Either i want to upload the files as regular files which is supported on ftp or i want execute msdeploy in automated manner


回答1:


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

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

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

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



来源:https://stackoverflow.com/questions/61615102/how-to-publish-asp-net-website-using-azuredevops-in-ftp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!