azure-devops - 如何设置 Azure Devops 以构建 Devexpress XAF-XPO 项目?

标签 azure-devops nuget-package xaf

我想在 Azure Devops 中为 XAP Mobile 应用程序设置持续集成和部署。

为了获得 CI/CD,我需要设置 Azure Pipeline 以安装正确的包。

Hosting your own NuGet feeds 上的文档中有一些信息
Get started with NuGet packages in Azure DevOps

Dev Express 解释说他们目前没有为 XAF 提供 Nuget 提要,但我可以自己制作 Delegate's DCNugetPackageBuilder

使用 DXNugetPackageBuilder 制作 Nuget 包

按照说明,我下载了 .pdb 文件,将它们提取到 c:\tmp\symbols

我还根据说明下载了 DXNugetPackageBuilder 并编辑了 buildPackages.bat。

接下来我在提升的 Powershell 中运行 build.ps1

这在 C:\tmp\Nuget 创建了 .nupkg 文件

默认情况下,这使用位于

 C:\Program Files (x86)\DevExpress 18.1\Components\Bin\Framework

和 .pdb 文件位于
c:\tmp\symbols

使用 Nuget.Exe 和凭据提供程序将包推送到提要

Connect To Feed 屏幕提到我需要下载 Nuget.exe 和凭据提供程序
download credential provider

以下是 the Credentials Provider 上的文档

我解压了 VSTS CredentialProviders Nuget.Exe 包括在内。

下一步是按照“连接到订阅源”屏幕的“添加此订阅源”部分给出的说明进行操作。

例如
nuget.exe push -Source "SBDDevExpress" -ApiKey VSTS c:\tmp\Nuget\DevExpress.Data.18.1.6.0.nupkg

我遇到了拒绝访问问题 that got solved here

然后我就可以推送我想要的所有包了。

设置 Nuget 包源

在打开我的解决方案的 VS2017 中,我使用了 Tools -> Nuget Package Manager -> Package Manager Settings

我添加了包设置,并将 Azure 端点设置为包源。

构建错误

当我运行构建管道时,我会收到类似的错误
The type or namespace DevExpress could not be found are you missing a directive or assembly reference?

looking at the pipeline error

从学习 Updater.cs 和 Module.cs
看来我在 Nuget 提要中缺少以下命名空间。
DevExpress.ExpressApp.DC;
DevExpress.ExpressApp.Updating;
DevExpress.Persistent.BaseImpl.PermissionPolicy;

[更新]

DevExpress 建议我将 bin 文件夹中生成的 dll 与我的软件包提要进行比较。

我发现了几个丢失的文件并推送了他们的包。

我现在有
XafMobile.Module\Properties\licenses.licx(1.0): Error LC0003: Unable to resolve type 'DevExpress.ExpressApp.ModuleBase"

showing in the build output

从源码可以看出 ModuleBase 是 DevExpress.ExpressApp 中的一个公共(public)类

我想知道这是否与反射有关。

在 Dev Express support 上有所提及

[更新]

我尝试删除许可证文件并同步项目。
现在错误显示为缺少程序集引用

missing assembly references

此外,当我重建我的解决方案时,属性文件夹中缺少许可证文件

我想知道 this helps explain it

[更新]

Manuel Grunder [DevExpress MVP] 和 DXNugetPackageBuilder 作者解释说

"
使用 nuget.packages 时,您还需要通过 nuget 引用它们
as he explains here
"

最佳答案

原样 explained here

“使用 nuget.packages 时,您还需要通过 nuget 引用它们。这就是它最初不起作用的原因。”

关于azure-devops - 如何设置 Azure Devops 以构建 Devexpress XAF-XPO 项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52772765/

相关文章:

azure-devops - 在舞台上添加条件以检查文件夹的变化

azure - 使用 azure cli 获取 Azure API 管理订阅 key

nuget - 迁移的 Visual Studio 项目未找到 NuGet 包

c# - 如何在 devexpress xaf audittrail 模块的 ListView 中显示时间部分

postgresql - 通过 Azure DevOps 中的 EFCore 迁移更新 postgreSQL DB

powershell - 如何使用 PAT 从本地 Azure Artifacts 存储库在 docker 容器中安装 powershell 模块?

c# - 从 REST Web API 应用程序创建 nuget 包

c# - 我自己托管的 NuGet 服务器不再正常工作

entity-framework-6 - 如何让 UWP Uninstall 完全删除数据库?