How to: Recompile the Business Class Library 如何:重新编译业务类库
-
The eXpressApp Framework supplies the Business Class Library that consists of three assemblies.
-
eXpressApp 框架提供由三个程序集组成的业务类库。
-
Assembly 程序集 Description 描述
DevExpress.Persistent.BaseImpl.v19.2.dll Contains ready-to-use XPO persistent classes.
包含现成的 XPO 持久类。
DevExpress.Persistent.BaseImpl.EF.v19.2.dll Contains ready-to-use Entity Framework Code First classes.
包含即用型实体框架代码第一类。
DevExpress.Persistent.Base.v19.2.dll Contains interfaces and helper classes used in XAF Extra Modules. Classes implementing these interfaces are available in the two DevExpress.Persistent.BaseImpl.* assemblies listed above.
包含 XAF 额外模块中使用的接口和帮助器类。实现这些接口的类在上面列出的两个 DevExpress.持久.BaseImpl.* 程序集中可用。
You can modify and recompile an assembly with ready-to-use XPO or EF entities using the steps below.
您可以使用以下步骤修改和重新编译具有即用型 XPO 或 EF 实体的程序集。
-
Run the Visual Studio Command Prompt as an administrator and execute the Sn.exe (Strong Name Tool)utility with the following parameters.
- 以管理员身份运行 Visual Studio 命令提示符,并使用以下参数执行 Sn.exe(强名称工具)实用程序。
sn -k "%PROGRAMFILES(x86)%\DevExpress 19.2\Components\Sources\DevExpress.Key\StrongKey.snk"
This will create the strong name file (see Strong-Named Assemblies
这将创建强名称文件(请参阅强命名程序集
-
Navigate to one of the following folders.
-
导航到以下文件夹之一。
- %PROGRAMFILES(x86)%\DevExpress 19.2\Components\Sources\DevExpress.Persistent\DevExpress.Persistent.BaseImpl - if you use XPO.
- %PROGRAMFILES(x86)%\DevExpress 19.2\Components\Sources\DevExpress.Persistent\DevExpress.Persistent.BaseImpl.EF - if you use EF.
Open the DevExpress.Persistent.BaseImpl.csproj or DevExpress.Persistent.BaseImpl.EF.csproj project in Visual Studio.
在可视化工作室中打开 DevExpress.持久.BaseImpl.csproj 或 DevExpress.Base.Base.EF.csproj 项目。
- If you use EF, ensure that the EntityFramework.dll assembly is available. The project already includes a reference to this assembly, but you may need to provide the DLL file. You can download it from NuGet, or copy it from the EF Demo project (%PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\EFDemoCodeFirstCS\EFDemo.Module\lib\EntityFramework.dll).
- 如果使用 EF,请确保实体框架.dll 程序集可用。该项目已包含对此程序集的引用,但您可能需要提供 DLL 文件。你可以从NuGet下载,或从EF演示项目复制它(%PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp
- Modify any class from the opened project.
- 从打开的项目修改任何类。
-
Compile the project by clicking Rebuild in the context menu invoked for the solution. Once this rebuild is successful, the default assembly located in the %PROGRAMFILES(x86)%\DevExpress 19.2\Components\Bin\Framework folder will be replaced with the modified assembly.
-
通过单击为解决方案调用的上下文菜单中的"重建"来编译项目。此重建成功后,位于 %PROGRAMFILES(x86)%%_DevExpress 19.2_组件_Bin_框架文件夹中的默认程序集将替换为修改后的程序集。
Note 注意
- By default, the same path is used for XAF solution references. If you use an alternate path, copy the created DevExpress.Persistent.BaseImpl.v19.2.dll or DevExpress.Persistent.BaseImpl.EF.v19.2.dll assembly to the appropriate location.
- 默认情况下,相同的路径用于 XAF 解决方案引用。如果使用备用路径,请将创建的 DevExpress.持久.BaseImpl.v19.2.dll 或 DevExpress.持久.BaseImpl.v19.2.dll 程序集复制到适当的位置。
- Some XPO-only modules (Audit Trail, Clone Object, and Reports V2 Mobile have references to the DevExpress.Persistent.BaseImpl.v19.2.dll library. If you are using these modules in your application, they must be rebuilt too. Refer to the How to rebuild assemblies from the source code article for details.
- 某些仅限 XPO 的模块(审核跟踪、克隆对象和报告 V2 移动具有对 DevExpress.持久性.baseImpl.v19.2.dll 库的引用)。如果您在应用程序中使用这些模块,也必须重新生成这些模块。有关详细信息,请参阅源代码文章中的"如何重建程序集"。
XAF开发成品案例参考
如果您觉得阅读本文对您有帮助,请点一下“推荐”按钮,您的“推荐”将是我最大的写作动力!欢迎各位转载,但是未经作者本人同意,转载文章之后必须在文章页面明显位置给出作者和原文连接,否则保留追究法律责任的权利。
作者博客: http://www.cnblogs.com/foreachlife
欢迎加入CIIP框架\XAF技术应用交流群: 336090194 群文件中有更多相关工具及文档资料
转载请注明出处。多谢!
欢迎加我微信: admiralcn 或扫码:

【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· 周边上新:园子的第一款马克杯温暖上架
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
· 使用C#创建一个MCP客户端