Azure DevOps与asp.net网站项目而不是Web应用程序的持续集成 [英] Azure DevOps Continuous Integration with asp.net website project instead of web application

查看:59
本文介绍了Azure DevOps与asp.net网站项目而不是Web应用程序的持续集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发人员对使用.net部署使用网站项目而不是Web应用程序项目提出了严格的要求.我能够连接并使用持续集成与Web应用程序项目很好,但是在使用网站时,它找不到要部署的已编译文件:

I have a hard requirement from the developer to use a website project instead of a web app project for a .net deployment. I am able to connect and use continuous integration just fine with a web app project, but when using website, it fails to find the compiled files for deployment:

#[debug]check path : D:\a\_tasks\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-
0ae63477cebe\1.142.2\task.json
##[debug]set resource file to: D:\a\_tasks\PublishBuildArtifacts_2ff763a7-ce83-4e1f-bc89-0ae63477cebe\1.142.2\task.json
##[debug]system.culture=en-US
##[debug]PathtoPublish=D:\a\1\a
##[debug]check path : D:\a\1\a
##[debug]ArtifactName=drop
##[debug]ArtifactType=Container
##[debug]system.hostType=build
##[warning]Directory 'D:\a\1\a' is empty. Nothing will be added to build artifact 'drop'.

看一下构建过程,它会将部署的副本编译到PrecompiledWeb文件夹而不是debug文件夹,这似乎可以解释为什么找不到结果.有没有人幸运地通过网站项目进行部署,或者您遇到上述问题?

Looking at the build process, it's compiling a copy of the deployment to the PrecompiledWeb folder instead of the debug folder, which seems to explain why it cannot find the results. Has anyone had luck deploying with a website project or have you run into the issue above?

推荐答案

Azure DevOps与asp.net网站项目而不是Web应用程序的持续集成

Azure DevOps Continuous Integration with asp.net website project instead of web application

由于该项目是asp.net网站,所以在通过MSBuild发布asp.net网站项目时,可能需要使用website.publishproj文件而不是.sln文件.

Since the project is asp.net website, you may need use the website.publishproj file instead of the .sln file when you publish the asp.net website project with MSBuild.

命令行如下:

msbuild.exe "<PathToTheFile>\website.publishproj" /p:deployOnBuild=true /p:publishProfile=WebsiteTestDemo /p:VisualStudioVersion=1x.0

使用此设置,MSBuild不会创建PrecompiledWeb文件夹,并且发布将使用配置文件中的设置.

With this setting, MSBuild does not create the PrecompiledWeb folder and the publish uses the setting in the profile.

检查我以前的主题以了解更多信息详细信息.

Check my previous thread for some more details.

网站项目的发布过程未纳入构建 过程.对于网站项目,因为没有正式的构建过程 我们没有什么可以扩展的.

The website project the publish process is not plumbed into the build process. For website project since there is no formal build process there was nothing for us to really extend.

希望这会有所帮助.

这篇关于Azure DevOps与asp.net网站项目而不是Web应用程序的持续集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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