Azure Devops Services管道构建失败。通过Visual Studio和msbuild命令提示符成功构建

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

我有两个项目都针对.Net Framework 4的解决方案。该解决方案在Visual Studio 2015和2017以及msbuild命令行中成功构建。

但是,当它使用Agent Specification vs2015-win2012r2在Azure DevOps Pipeline中构建时,第一个项目失败,并出现以下错误。 NuGet恢复步骤显示它已成功安装了NuGet EntityFramework 5.0软件包。

The type or namespace name 'Infrastructure' does not exist in the namespace 'System.Data.Entity' (are you missing an assembly reference?)
The type or namespace name 'DbContext' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'DbModelBuilder' could not be found (are you missing a using directive or an assembly reference?)

当我将代理规范更改为vs2017-win2016时,第一个项目的构建没有错误,但是第二个项目失败并出现以下错误:

The type or namespace name 'Description' does not exist in the namespace 'System.Web.Http' (are you missing an assembly reference?)
The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)
Error CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)

我确实在包含System.Web.Http.dll的csproj文件中引用了NuGet包Microsoft.Asp.Net.WebApi.Core.4.0.20710.0。


我已打开调试选项。这是指向NuGet恢复日志https://drive.google.com/open?id=1lJWflXTjYTN_MQyLOnwMUr-8LKoR5JRo]的链接>

和构建日志https://drive.google.com/open?id=1ypAVWxniDLfBOBHc4gODdAoQOCQnphYg

我有两个项目都针对.Net Framework 4的解决方案。该解决方案在Visual Studio 2015和2017以及msbuild命令行中成功构建。但是,当它内置于...

azure-devops
1个回答
0
投票

根据您的日志,有一条警告消息。

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