-
Notifications
You must be signed in to change notification settings - Fork 0
Building
You can build a project using the project Ribbon Bar, or the project’s context menu “Build” item, or Visual Studio’s Build command.
Note: Before being able to build a project, you must save all its parts.
Before building, you can customize the possible outputs, include or exclude producers depending on configuration, etc. If you open the CodeModeler project properties (using standard Visual Studio commands), you will see a “Build” tab:
This options page allows you to configure the producers / generators according to Visual Studio configuration. Here we can see that, in Release mode, we will produce instances, and use the Business Object Model producer.
Note: A CodeModeler project only supports the “.NET” platform.
During and after the build, CodeModeler updates the two Visual Studio standard “Output” and “Error List” tool windows, for example:
The Output window will show the Console output of the CodeModeler Meta Compiler. Detailed results can also be see using the project’s context menu’s “View Last Build Log” menu item. This will output the content of a [project name].build.xml
file that is created aside the project file.
The Error List window will synthetize warnings and/or errors that the CodeModeler Meta Compiler has detected. Here we see a CM0078 error has been raised in the “CarRental” project.
Note: The File and Line columns in the Error List window have no meaning in a CodeModeler project context.
In the Visual Studio environment, producers can be configured to modify targets projects in place, if the project successfully builds.
For example, the output for the “Business Object Model” producer can not only generate C# files, but can also add these files to a target C# project. For example, in the following screenshot, using the BOM producer, we can target a C# project named “CarRental.Bom” in the same Visual Studio solution:
Each time we choose to Build the project “CarRental” CodeModeler project, CodeModeler will automatically modify the “CarRental.Bom” project to synchronize it with the model. If an entity is added to the project, new C# classes will be generated, and the files will be added to the C# project. If entities are deleted, the corresponding files will be physically deleted and removed from the project.
This is a sample result of a simple build; no manual action has been made to the C# project:
Notes:
- .NET References are also automatically added to target C# projects, when possible.
- .ResX files (resources) are also added, for all cultures declared in the project and for the neutral culture as well.
- for other Visual Studio projects targeting .Net Standard, .Net Core or .Net Framework that reference the Business Object Model libray, a NuGet SoftFluent.CodeModeler.Runtime package is available on nuget.org
- Introduction
- Architect Guide
- Concepts
- Using Visual Studio
- Overview
- Creating a CodeModeler Project
- Visual Environment
- Project Hierarchy
- Design Surface
- Customizing Design Surfaces
- Ribbon Bar
- Property Grid
- Member Format Expressions
- Model Grid
- Method Editor
- View Editor
- Instance Editor and Grid
- Resources Editor
- Inferred Model Viewer
- Building
- Project Physical Layout
- Source Control Support
- Generating
- Aspect Oriented Design (AOD)
- Developer Guide
- The Business Object Model (BOM)
- CodeModeler Query Language (CMQL)
- Starting Guide - Tutorial
- Upgrade From CFE