Folder Structure

Article: Dec 17, 2024

Maintaining a consistent folder structure is essential for managing projects in Dynamics 365 for Finance and Operations. A clear and logical structure ensures smoother collaboration, reduces errors, and supports the long-term maintainability of the codebase.

This guideline provides recommendations for organizing your projects effectively, alongside alternative folder structures commonly used in the community.

Below is a recommended folder structure for Dynamics 365 FO projects:

/App
  /SourceCode
  /BinaryOnly
  /CustomScript
  /License
/Pipeline
/Solution
  /BuildSolution
.gitignore
README.md

File and Folder Explanations

NameDescription
App/SourceCodeContains all source code specific to modules, including customizations and extensions.
App/BinaryOnlyModules provided as binary-only packages, such as ISV solutions or third-party code.
App/CustomScriptCustom scripts for data fixes, one-time tasks, or environment configurations.
App/LicenseDedicated folder for module-specific license files
PipelineYAML definitions for CI/CD pipelines and other automation processes.
SolutionVisual Studio solution and project files.
Solution/BuildSolutionDedicated folder for CICD build solution.
.gitignoreSpecifies paths and files to exclude from version control.
README.mdProvides an overview of the repository structure and its purpose.

Common Alternatives

While the recommended structure covers most use cases, the following alternatives are also widely used in the community:

Simplified Metadata Folder

In this structure, all code-related files, including source codes and binary-only modules, are stored in a single Metadata folder. This simplifies navigation for smaller teams or projects:

/Metadata
/License
/Projects
  /BuildSolution

Key Differences:

  • Metadata: Combines source code and binary-only packages into a unified folder.
  • Projects: Alternative name for the Solution folder, housing all project files.

Choosing the Right Structure

Selecting the right structure depends on the project’s scope, team size, and specific requirements. The recommended structure provides a balance of simplicity and scalability, but teams may adapt based on their workflows and tools.

Always document any deviations from the recommended structure in the project’s README.md to ensure alignment and understanding across the team.