Search through blog..

Wednesday, April 26, 2017

D365Ops Tip#2: Where is Source code located in Dynamics 365 for operations!

With Dynamics 365 for Operations (D365Ops), there is so much change from its immediate previous version. And one such major change is done in How the Source code is saved?


If you have every worked in AX2009, you know that the source code is saved in files in a specific file location in the AOS server. Now with D365Ops, Microsoft has fallen back to the concept of storing the files in file system instead of database (model database in AX2012 used to hold all the code base).


And the developers working with D365Ops, the primary question is where & how the source code is kept & handled.


Where to find the Source code:
The application code for Dynamics 365 for operations is stored in File system, usually in a directory named PackageDirectory. You can find the details on the configuration related to AOS in a web.config file.


Steps to follow:
  1. Open IIS and go to the Sites\AOSService (in case you missed, AOS is a web service with D365Ops).
  2. Right click > Explore
  3. You should be directed to a folder (to J:\AosService\WebRoot if you are using MS demo environments)
  4. Now search for the web.config file and open it.
  5. Search for keyword - "Aos.PackageDirectory" and you should be able to find the value for the Package directory.
  6. It should be J:\AosService\PackagesLocalDirectory (if you are using MS demo environments)





How is the Source code updated in File system:
Now if we try to look into how the code is stored in the File system. In the above identified PackageDirectory, you will find that there are individual folders to consist the code changes for each Model.


The simplest way to understand the structure is to create your own model and verify the below:
  1. Look for the folder relevant to your newly created model (in my case, AJDEV)
  2. Under path //PackageLocalDirectory/AJDEV/AJDEV - you will observe that there are #78 new folders created for each element type in the AOT. All with a sub folder Delta which is going to store the changes made.
  3. And under path //PackageLocalDirectory/AJDEV/Descriptor - you will find a config file storing the information about your model.
  4. And under path //PackageLocalDirectory/AJDEV/XPPMetadata - the metadata information about the AOT objects is stored.
I will write more about few AOT elements and the extensions introduced with D365Ops and we will look more into the structure and changes in the XMLs placed under Delta folder, but now keeping it short - Happy learning!

No comments: