Template for D365 FO (Microsoft Dynamics 365 Finance and Operations) projects (Git)
-
Clone (or use the template) the repository on your development environment.
-
Add your models to the Metadata folder.
Example structure:
$/Metadata +---MyMainModule | +---Descriptor | | MyMainModule.xml | | | +---MyMainModule | +---AxClass | | MyClass.xml | | | \---AxTable | MyMainTable.xml | \---MyOtherModule +---Descriptor | MyOtherModule.xml | \---MyOtherModule \---AxClass MyTestClass.xml -
Create your Solutions and Projects on the Projects folder.
-
Edit the
registerSymbolicLink.ps1andunregisterSymbolicLink.ps1script and change the$AOSMetadataPathto yourPackagesLocalDirectorypath. -
Open Powershell as administrator on the path of your repository and run the
registerSymbolicLink.ps1script.> .\registerSymbolicLink.ps1This will create a symbolic link for the models on the Metadata folder to your
PackagesLocalDirectoryfolder. That way, it would seem as if your model is still residing on thePackagesLocalDirectoryfolder. -
Share your Metadata folder to Everyone and set the permission to Read.
When creating a new model, you'll find the model on PackagesLocalDirectory. To add it to the repository, do the following:
-
Close Visual Studio.
-
Stop IIS, if necessary.
-
Stop Batch service, if necessary.
-
Cut the model from
PackagesLocalDirectory. -
Paste it to your
Metadatafolder. -
Open Powershell as administrator on the path of your repository and run the
unregisterSymbolicLink.ps1script.> .\unregisterSymbolicLink.ps1This will unregister all links from your Metadata folder to avoid issues when running the register script afterwards.
-
After unregistering your models, run the
registerSymbolicLink.ps1script to register all models including the new model.> .\registerSymbolicLink.ps1 -
Start IIS and the Batch service, if stopped.
-
Repeat these steps whenever you have to create a new model to include them on the repository.