使用Azure DevOps从多项目.NET解决方案部署单个项目时,CICD管道生成错误

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

我正在尝试使用CICD从多项目.net解决方案中构建单个cs项目,但是在MSBuild中会出现错误。我正在使用boilerplate。以下是我制作流程的步骤:

<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9CZDFDYy5wbmcifQ==” alt =“管道>“获取源”““构建解决方案”

在构建中,我收到一些程序集引用错误,例如

Error CS0246: The type or namespace name 'Abp' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246: The type or namespace name 'FullAuditedEntity' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246: The type or namespace name 'DependsOnAttribute' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246: The type or namespace name 'DependsOn' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246: The type or namespace name 'AbpZeroCoreModule' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246: The type or namespace name 'AbpZeroLdapModule' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246: The type or namespace name 'ILocalizableString' could not be found (are you missing a using directive or an assembly reference?)
visual-studio azure-devops visual-studio-2017 azure-pipelines aspnetboilerplate
1个回答
0
投票

错误CS0246:找不到类型或名称空间名称'Abp'(是您是否缺少using指令或程序集引用?)错误CS0246:找不到类型或名称空间名称“ FullAuditedEntity”(是您缺少using指令或程序集引用吗?)……

这些错误表明与boilerplate相关的程序集未成功还原。因此,您的实际问题可能来自nuget restore步骤。

为此:

1。确保您的项目通过nuget包 [Boilerplate,Abp.AspNetCore ...]引用了boilerplate相关程序集。>

2。检查您的nuget restore task日志,并确保您可以看到类似这样的内容:

enter image description here

如果看不到此消息,请尝试使用dotnet restore任务+ **/*.sln还原项目的程序包。

希望有帮助:)

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