问题描述
我想在Azure Devops中为XAP Mobile应用程序设置持续集成和部署.
I want to set up continuous integration and deployment for an XAP Mobile app in Azure Devops.
为了获取CI/CD,我需要设置Azure管道以安装正确的程序包.
In order to get CI/CD I need to set up the Azure Pipeline to install the right packages.
托管您自己的NuGet提要上的文档中有一些信息和获取从Azure DevOps中的NuGet包开始
Dev Express解释说,他们目前不为XAF提供Nuget提要,但我可以制作自己的委托DCNugetPackageBuilder
Dev Express explained that they do not currently provide a Nuget feed for XAF, but I can make my own Delegate's DCNugetPackageBuilder
使用DXNugetPackageBuilder制作Nuget软件包
按照说明,我下载了.pdb文件并将其提取到c:\ tmp \ symbols
As per the instructions I downloaded the .pdb files extracted them to c:\tmp\symbols
我还下载了DXNugetPackageBuilder并根据说明编辑了buildPackages.bat.
I also downloaded DXNugetPackageBuilder and edited buildPackages.bat according to instructions.
接下来,我在提升的Powershell中运行build.ps1
Next I ran build.ps1 in elevated Powershell
这在C:\ tmp \ Nuget中创建了.nupkg文件
This created the .nupkg files at C:\tmp\Nuget
默认情况下,此文件使用位于
By default this uses the files located at
C:\Program Files (x86)\DevExpress 18.1\Components\Bin\Framework
和位于
c:\tmp\symbols
使用Nuget.Exe和凭据提供程序将程序包推送到提要
连接到提要"屏幕上提到我需要下载Nuget.exe和凭据提供程序
The Connect To Feed screen mentions I need to download Nuget.exe and the credential provider
以下是凭据上的文档提供者
我解压缩了VSTS CredentialProviders Nuget.其中包括Exe.
I unzipped the VSTS CredentialProviders Nuget.Exe is included.
下一步是按照连接到提要"屏幕上添加此提要"部分给出的说明进行操作.
The next step is to follow the instructions given by the "add this feed" section of the Connect To Feed screen.
例如
nuget.exe push -Source "SBDDevExpress" -ApiKey VSTS c:\tmp\Nuget\DevExpress.Data.18.1.6.0.nupkg
我遇到了拒绝访问的问题
I ran into an access denied issue that got solved here
然后我就能推送我想要的所有包裹.
then I was able to push all the packages I wanted.
设置Nuget软件包源
在打开我的解决方案的VS2017中,我使用了工具-> Nuget软件包管理器->软件包管理器设置
In VS2017 with my solution open I used Tools -> Nuget Package Manager -> Package Manager Settings
我添加了程序包设置,并将Azure终结点设置为程序包源.
I added package settings with the Azure endpoint set up as a package source.
错误构建
当我运行构建管道时,会出现类似的错误
When I run the build pipeline I get errors like
The type or namespace DevExpress could not be found are you missing a directive or assembly reference?
通过研究Updater.cs和Module.cs看来我在Nuget资讯提供中缺少以下命名空间.
From studying Updater.cs and Module.csIt seems I am missing the following namespaces from the Nuget feed.
DevExpress.ExpressApp.DC;
DevExpress.ExpressApp.Updating;
DevExpress.Persistent.BaseImpl.PermissionPolicy;
[更新]
DevExpress建议我将bin文件夹中生成的dll与我的软件包提要进行比较.
DevExpress suggested I compare the dlls generated in the bin folder with my package feed.
我发现了几个丢失的文件,并推送了它们的包.
I found several missing files and pushed their packages.
我现在有
XafMobile.Module\Properties\licenses.licx(1.0): Error LC0003: Unable to resolve type 'DevExpress.ExpressApp.ModuleBase"
从源代码中我可以看到ModuleBase是DevExpress.ExpressApp中的公共类
I can see from the source code that ModuleBase is a public class in DevExpress.ExpressApp
我想知道这是否与反射有关.
I am wondering if this is something to do with reflection.
在Dev Express中有一些提及支持
There is some mention of it at Dev Express support
[更新]
我尝试删除许可证文件并同步项目.现在错误显示为缺少程序集引用
I tried removing the licence files and syncing the project.Now the errors show as missing assembly references
此外,当我重建解决方案时,属性文件夹中缺少许可证文件
Also When I rebuild my solution the license files are missing from the properties folders
我想知道这是否有帮助解释一下
[更新]
Manuel Grunder [DevExpress MVP]和DXNugetPackageBuilder作者解释说
Manuel Grunder [DevExpress MVP] and DXNugetPackageBuilder author explained that
"使用nuget.packages时,您也需要通过nuget引用它们他在这里解释"
"When working with nuget.packages you need to reference them via nuget as wellas he explains here"
推荐答案
在使用nuget.packages时,您也需要通过nuget引用它们.这就是为什么它首先无法使用的原因."
"When working with nuget.packages you need to reference them via nuget as well. Thats the reason why it did not work in the first place."
这篇关于如何设置Azure Dev Ops来构建Dev Express XAF-XPO项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!