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.ps1
andunregisterSymbolicLink.ps1
script and change the$AOSMetadataPath
to yourPackagesLocalDirectory
path. -
Open Powershell as administrator on the path of your repository and run the
registerSymbolicLink.ps1
script.> .\registerSymbolicLink.ps1
This will create a symbolic link for the models on the Metadata folder to your
PackagesLocalDirectory
folder. That way, it would seem as if your model is still residing on thePackagesLocalDirectory
folder. -
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
Metadata
folder. -
Open Powershell as administrator on the path of your repository and run the
unregisterSymbolicLink.ps1
script.> .\unregisterSymbolicLink.ps1
This will unregister all links from your Metadata folder to avoid issues when running the register script afterwards.
-
After unregistering your models, run the
registerSymbolicLink.ps1
script 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.