我正在尝试使用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?)
错误CS0246:找不到类型或名称空间名称'Abp'(是您是否缺少using指令或程序集引用?)错误CS0246:找不到类型或名称空间名称“ FullAuditedEntity”(是您缺少using指令或程序集引用吗?)……
这些错误表明与boilerplate
相关的程序集未成功还原。因此,您的实际问题可能来自nuget restore
步骤。
为此:
1。确保您的项目通过nuget包 [Boilerplate,Abp.AspNetCore ...]引用了boilerplate
相关程序集。>
2。检查您的nuget restore task
日志,并确保您可以看到类似这样的内容:
如果看不到此消息,请尝试使用dotnet restore
任务+ **/*.sln
还原项目的程序包。
希望有帮助:)