简体   繁体   English

Azure网站持续部署总是选择错误的项目

[英]Azure Website Continuous Deployment always picks up the wrong project

I have the following folder structure in my TFS online: 我的TFS在线有以下文件夹结构:

在此输入图像描述

The folder names also match the project names in the solution. 文件夹名称也与解决方案中的项目名称匹配。

Legend: 传说:

  • green dot: web api 2.0 project 绿点:web api 2.0项目
  • red dot: class library 红点:类库
  • blue dot: console app added as a webjob to the web project 蓝点:控制台应用程序作为webjob添加到Web项目
  • grey dot: console app only used for testing 灰点:仅用于测试的控制台应用程序

Working folders for build definition: 构建定义的工作文件夹: 在此输入图像描述

The build definition was created automatically by connecting Azure to TFS online, and I have only changed the folder, so instead of the Team Project root folder, it points to the folder of this branch, containing the solution file and the folders in the first picture. 通过在线连接Azure到TFS自动创建构建定义,我只更改了文件夹,因此它指向该分支的文件夹,而不是Team Project根文件夹,其中包含解决方案文件和第一张图片中的文件夹。

(This points to the folder which contains the solution files as well as all the subfolders from the first image. (这指向包含解决方案文件的文件夹以及第一张图像中的所有子文件夹。

Problem: When I run a build, it always picks up the ExpiringRateCardsWorker project (even now the Web project has been renamed (both the directory and the project file) to start with an underscore, so it will be first alphabetically. 问题:当我运行构建时,它总是选择ExpiringRateCardsWorker项目(即使现在Web项目已被重命名(目录和项目文件)以下划线开头,因此它将首先按字母顺序排列。

The deployment is successful, this is what I see in Monaco: 部署成功,这是我在摩纳哥看到的:

在此输入图像描述

How can I make it pick up the web project? 如何让它获取Web项目?

Edit: Question was closed stating to be the duplicate of this . 编辑:问题被关闭,说明是的重复 I have since tried the solution suggested there, but the /site/deployments folder is empty on the FTP, it doesn't contain the deploy.cmd , so my question is still not answered unfortunatelly. 我已经尝试了那里建议的解决方案,但是/site/deployments文件夹在FTP上是空的,它不包含deploy.cmd ,所以我的问题仍然没有得到解决。

I'm experiencing similar problem with deployment of MVC application to Azure using CD in VSO. 我在使用VSO中的CD将MVC应用程序部署到Azure时遇到了类似的问题。 This problem is somehow related to WebJob Publishing mechanism. 此问题与WebJob发布机制有某种关联。

For now I wasn't able to deploy my whole solution with WebJob in one go, but when I've deleted all webjob *.json files and Microsoft WebJobs Publish NuGet package from my solution, I've managed to deploy my MVC App normally. 目前我无法一次性使用WebJob部署我的整个解决方案,但是当我从我的解决方案中删除所有webjob * .json文件和Microsoft WebJobs Publish NuGet包时,我已经设法正常部署我的MVC应用程序。

I think I'll have to deploy this parts of the application separately, for now. 我想我现在必须单独部署应用程序的这部分内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM