我想通过 Azure DevOps Build Pipeline 将 ASP.NET Core 项目部署到 Azure WebApp .
我的项目结构如下:
MyProject
-> src
-> Project1
-> Project1.csproj
-> ...
-> MainProject
-> MainProject.csproj
-> ...
-> test
-> MyProjectTests
-> MyProjectTests.csproj
-> ...
因此项目位于文件夹“src”中,这可能会导致Build Pipeline中出现问题 .
My build pipeline settings:
因此构建管道中没有错误,但是 dll's within site/wwwroot are not updated, like deploying manually . 我只能看到MyProject / src中的 folders containing the full source of the different projects ...所以Web应用程序的结构如下所示:
site/wwwroot
-> Project1
-> Project1.csproj
-> ...
-> MainProject
-> MainProject.csproj
-> ...
所以我删除了site / wwwroot中的所有文件,当我通过Azure DevOps部署时,我在WebApp上遇到以下错误:您没有权限查看此目录或页面 . 当我将设置"package or folder"更改为MyProject / src / MainProject时,我在WebApp上出现以下错误:HTTP错误502.5 - 进程失败
包或文件夹设置是否错误或其他?
而且, no tests can be found to execute ..这是日志的一部分:
2018-11-19T17:32:55.0038771Z Test selector : Test assemblies
2018-11-19T17:32:55.0042959Z Test assemblies : **\release\*test*.dll,!**\obj\**
2018-11-19T17:32:55.0043286Z Test filter criteria : null
2018-11-19T17:32:55.0047373Z Search folder : D:\a\1\s
2018-11-19T17:32:55.0049408Z Run settings file : D:\a\1\s
2018-11-19T17:32:55.0051612Z Run in parallel : false
2018-11-19T17:32:55.0053271Z Run in isolation : false
2018-11-19T17:32:55.0075597Z Path to custom adapters : null
2018-11-19T17:32:55.0076007Z Other console options : null
2018-11-19T17:32:55.0078359Z Code coverage enabled : false
2018-11-19T17:32:55.0079452Z Diagnostics enabled : false
2018-11-19T17:32:55.0084375Z Rerun failed tests: false
2018-11-19T17:32:55.0087931Z VisualStudio version selected for test execution : latest
2018-11-19T17:32:56.2022983Z ========================================================
2018-11-19T17:32:56.4234339Z ##[warning]No test assemblies found matching the pattern: **\release\*test*.dll,!**\obj\**.