Azure构建管道未生成bin文件夹

问题描述 投票:0回答:1

我有一个包含多个项目的aspnet MVC 5解决方案,我需要使用azure CI和CD发布主项目,因此我配置了azure构建管道(请参阅附件以获取配置)。但是当生成工件时,我注意到没有包含部署文件的bin文件夹。此行为的可能原因是什么?

This is the generated artifact

This is Solution Configuration task

This is the publish path

This is publish artifact configuration task

asp.net-mvc asp.net-mvc-5 azure-devops
1个回答
0
投票

此行为可能是什么原因?

根据您提供的图像,如果我在Visual Studio构建任务中选择项目文件.csproj而不是解决方案文件.sln,则可以重现此问题:

enter image description here

那是因为如果我们选择项目文件.csproj,则在构建项目时会出现警告:

Warning : The OutputPath property is not set for project 'ASP.NETMVC.csproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='release'  Platform='any cpu'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.

enter image description here

尽管通过了任务的结果,但由于上述警告,输出未正确输出。

成功构建的原因,但是未生成bin文件夹。

要解决此问题,我们在Visual Studio Build任务中选择解决方案文件:

enter image description here

然后警告消失,并生成bin文件夹:

enter image description here

希望这会有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.