简体   繁体   English

尝试在 Azure DevOps Pipeline 中构建时未找到项目文件

[英]Project File Not Found while attempting build in Azure DevOps Pipeline

I have a solution that has 6 projects, some of which are in separate DevOps projects.我有一个包含 6 个项目的解决方案,其中一些在单独的 DevOps 项目中。 I am attempting to setup a build pipeline in Azure DevOps and my repository is already located there.我正在尝试在 Azure DevOps 中设置构建管道,并且我的存储库已经位于那里。 Regardless of location, I continue to get errors that the csproj file cannot be found for any of the projects.无论位置如何,我都会继续收到无法为任何项目找到 csproj 文件的错误消息。 The build cannot continue without the csproj files (obviously).如果没有 csproj 文件(显然),构建将无法继续。

I have tried to move the .SLN file to the root folder, inside the specific project file and still get this error.我试图将 .SLN 文件移动到特定项目文件内的根文件夹,但仍然出现此错误。 I have also looked at the relative paths in the .SLN and attempted to manually modify them without any change.我还查看了 .SLN 中的相对路径,并尝试在没有任何更改的情况下手动修改它们。

Additionally, I used the vanilla configuration for the build pipeline before attempting to change path locations etc.此外,在尝试更改路径位置等之前,我对构建管道使用了 vanilla 配置。

Here is the structure of source control: Source structure这是源代码管理的结构:源结构

The 6 projects highlighted yellow are included in this solution.此解决方案中包含 6 个突出显示为黄色的项目。

Here is the output errors from the build in DevOps: Output errors以下是 DevOps 中构建的输出错误输出错误

I also tried adding the locations explicitly without any luck.我也尝试过明确添加位置而没有任何运气。 By default, the location path was just $/PermitInspector/PermitInspector which is the location of the .SLN file.默认情况下,位置路径只是 $/PermitInspector/PermitInspector,它是 .SLN 文件的位置。 (Which is where I started with the attempt to automate builds). (这是我尝试自动化构建的起点)。

Any suggestions would be helpful and I would be happy to share additional information or screen grabs that might be useful, but this is all I can come up with so far.任何建议都会有所帮助,我很乐意分享可能有用的其他信息或屏幕截图,但这就是我目前所能想到的。

I was able to resolve the path issues by applying path filters under the build configuration in DevOps.我能够通过在 DevOps 中的构建配置下应用路径过滤器来解决路径问题。 There is a single work space and 3 of the projects are located in a root folder within the work space and the other 3 projects were in a separate root folder.有一个工作空间,其中 3 个项目位于工作空间内的根文件夹中,其他 3 个项目位于单独的根文件夹中。 The main issue appeared to be that the solution file is located inside the second root folder so I had to explicitly define the path to the other project files.主要问题似乎是解决方案文件位于第二个根文件夹内,因此我必须明确定义其他项目文件的路径。 By default, the only mapped work space was to the location of the SLN file.默认情况下,唯一映射的工作空间是 SLN 文件的位置。 Now if I can just get NuGet restore working for the sub-projects!现在,如果我能让 NuGet 恢复为子项目工作! Thanks again,再次感谢,

Correct mapping that fixed the issue解决问题的正确映射

暂无
暂无

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

相关问题 Azure DevOps CICD 构建管道因错误而失败:未找到指定的命令或文件 - Azure DevOps CICD build pipeline fails with error: specified command or file was not found flutter 使用 azure devops 构建管道 - flutter build pipeline with azure devops 如何在 azure devops 管道中将项目文件复制到构建文件夹中? - How do you copy project files into build folder post-build in azure devops pipeline? .Net Core解决方案在本地构建,但无法在Azure DevOPS管道上构建 - .Net Core solutions build locally, but fails build on Azure DevOPS pipeline 在 Azure DevOps 中,是否可以使用 API 递归地枚举子管道构建工件? - In Azure DevOps, is it possible to enumerate children pipeline build artifacts recursively with API? 在离线服务器上构建 Azure Devops Pipeline - NuGet 包? - Azure Devops Pipeline build on OFFLINE server - NuGet packages? 是否可以在Azure DevOps上的构建管道中下载文件? - Is it possible to download files during the build pipeline on Azure DevOps? Azure DevOps Pipeline Build 在 GAC 中丢失 DLL 引用失败 - Azure DevOps Pipeline Build fails missing DLL reference in GAC Azure Devops 管道中的警告是否会影响构建时间 - Does Warnings in Azure Devops pipeline affects the build time 如何修复Azure devops上的生成错误“使用文件'--Assembly.snk'中的公钥对输出进行签名错误-找不到文件”? - How to fix the build error ''Error signing output with public key from file '--Assembly.snk' — File not found" on Azure devops?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM