- MDriven Source Code Instructions
You can build the MDriven runtime assemblies from a licensed source export for debugging while continuing to use the MDriven Designer and Visual Studio plugin from the standard installation.
- Before you start
The source-code license permits use of the supplied source files **solely to debug the MDriven product**. The files are confidential. Do not modify, distribute, merge, or create derivative works from them, and do not disclose them to third parties.
Read the complete terms before accessing or using the export: MDriven Source Code License(https://wiki.mdriven.net/BestPractices:Source_code_license).
> **Important:** Build the source with Visual Studio 2022, including solutions or projects whose names contain another Visual Studio version.
- Choose the build you need
| Goal | What to build | Recommended use | |---|---|---| | Debug runtime behavior used by your application | The runtime assemblies you need, starting with `MDriven.Interfaces` | Recommended approach. Keep using MDriven Designer and the Visual Studio plugin from the standard MDriven installation. | | Build the complete runtime source solution | `Source\Eco\MDriven.NetStandard.sln` | Use when debugging requires assemblies beyond the minimum runtime set. | | Build design-time components | `Source\MDrivenVSIX\MDrivenFramework.sln` | Only when you specifically need design-time debugging. Additional build instructions are required. |
- Minimum runtime build
Start with `MDriven.Interfaces`. Other projects depend on it, so resolve any errors in this assembly before investigating downstream projects.
Depending on the runtime behavior you need to debug, the minimum set may include:
- `MDriven.Interfaces` - `MDriven.Handles` - `MDriven.Persistence` - `MDriven.LinqExtensions`
For example, if the issue occurs while your application loads or persists modeled objects, build `MDriven.Interfaces` first and then add the persistence-related assemblies needed for that debugging scenario. You do not need to build the MDriven Designer or Visual Studio plugin for this workflow.
- Build the full runtime solution
Use these steps to build the .NET Standard runtime output from a source export such as `SourceCodeExportYYYYMMDD`.
- 1. Open the solution in Visual Studio 2022
1. Start **Visual Studio 2022**. 2. Select **File > Open > Project/Solution**. 3. Open:
```text SourceCodeExportYYYYMMDD\Source\Eco\MDriven.NetStandard.sln ```
Replace `SourceCodeExportYYYYMMDD` with the folder name of your extracted source export.
- 2. Create a local strong-name key
The projects are configured to sign their assemblies using this relative path:
```text ..\..\..\ecokey.snk ```
The source export does not include this key. Create your own local key and save it here:
```text SourceCodeExportYYYYMMDD\ecokey.snk ```
One way to create the key is through a project's signing settings:
1. In **Solution Explorer**, select a project. 2. Open the project properties and select **Signing**. 3. Create a new strong-name key file named `ecokey.snk`. 4. Save the key in the root folder of the source export, one level above `Source`.
All projects expect the same `ecokey.snk` file at that location.
> **Gotcha:** If `ecokey.snk` is missing or stored in another folder, assembly signing fails. Fix the key location before troubleshooting dependent project build errors.
The alternative is to remove assembly signing in each project, but creating the local key at the expected location avoids changing project signing settings.
- 3. Build
1. In Visual Studio, select **Build > Build Solution**. 2. Address errors in `MDriven.Interfaces` first. 3. Rebuild the solution after resolving that project, then continue with any remaining dependent-project errors.
The build output is placed in:
```text SourceCodeExportYYYYMMDD\Stage\netstandard2.0 ```
- Design-time build
A design-time build is separate from the runtime solution. If you need to debug design-time functionality, open and build:
```text SourceCodeExportYYYYMMDD\Source\MDrivenVSIX\MDrivenFramework.sln ```
This page does not provide the remaining design-time build and deployment steps. Do not assume that building this solution alone installs or replaces the standard MDriven Designer or Visual Studio plugin.
- Troubleshooting checklist
| Symptom | Check first | |---|---| | Build fails because a signing key cannot be found | Confirm that `ecokey.snk` exists directly in `SourceCodeExportYYYYMMDD`, not under `Source`. | | Many projects fail after one core project fails | Build and fix `MDriven.Interfaces` first because other projects use it. | | You only need to debug an application runtime issue | Build only the required runtime assemblies; continue using the Designer and Visual Studio plugin from the standard installation. | | You need a design-time build | Open `Source\MDrivenVSIX\MDrivenFramework.sln` and obtain the additional design-time instructions before attempting deployment. |
- Related documentation
- MDriven Source Code License(https://wiki.mdriven.net/BestPractices:Source_code_license) — permitted use and confidentiality requirements for the source export. - MDriven Core Concepts(https://wiki.mdriven.net/BestPractices:Main_concepts_definition) — definitions of MDriven and Modlr. - Documentation:MDriven Architecture(https://wiki.mdriven.net/Documentation:MDriven_Architecture) — how runtime and design-time parts fit into the MDriven architecture. - Documentation:Designer(https://wiki.mdriven.net/Documentation:Designer) — MDriven Designer documentation.
