【发布时间】:2020-04-27 01:49:30
【问题描述】:
我正在尝试使用 CICD 从多项目 .net 解决方案构建单个 cs 项目,但它在 MSBuild 中出现错误。我正在使用boilerplate。以下是我的管道的步骤:
在构建中,我遇到了一些程序集引用错误,例如
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?)
【问题讨论】:
-
如果该项目是asp.net核心项目,我建议你使用dotnet restore任务而不是nuget restore任务。查看Nuget任务中的Note,可以看到:
Using or creating .NET Core or .NET Standard packages? Use the .NET Core task, which has full support for all package scenarios currently supported by dotnet, including restore, pack, and nuget push.
标签: visual-studio azure-devops visual-studio-2017 azure-pipelines aspnetboilerplate