1

I'm just getting started with Microsoft Dynamics 365.

As I muck about with it, I'd like to have my source code in a git repo so I can track my changes and go back, if necessary or desirable.

I created a repo on Azure DevOps, however, it seems Visual Studio 2017 is not keeping local copies of my metadata in the project folder, so when I add and push the contents of this folder, the stuff I'm interested in does not go to the repo.

I gather my updated metadata is actually going into C:\AOSService\PackagesLocalDirectory , but how can I include this as part of my project?

FH-Inway
  • 4,432
  • 1
  • 20
  • 37
Brian Kessler
  • 2,187
  • 6
  • 28
  • 58
  • 1
    Short answer: symbolic links Longer answer: several people out there have written on how to set up D365FO version control with git, one of the first was [Using Git with MSDyn365FO](https://msdyn365fo.wordpress.com/2020/01/16/using-git-with-msdyn365fo/) – FH-Inway Jun 22 '21 at 15:25
  • @FH-Inway, cheers for the response. I saw that blog on using git and tried to set up the symbolic link, but it silently failed... Is there somewhere I can get more detailed instructions? – Brian Kessler Jun 23 '21 at 07:47
  • 1
    Creating symbolic links isn't something specific to D365FO, you should easily find more detailed instructions on that, e.g. https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/ If the script from the linked blog fails, you could try to execute the statements inside the scripts yourself with the -Verbose switch to get more information. In addition, take a look at [Using git with Dynamics 365 for Finance and Operations](https://axcandymountain.blogspot.com/2018/06/using-git-with-dynamics-365-for-finance.html), same author as the other. – FH-Inway Jun 23 '21 at 11:26
  • 1
    @FH-Inway, if you'd like to include your comment as an answer, I'm happy to accept it. :-) – Brian Kessler Jul 05 '21 at 09:39

1 Answers1

2

Short answer

Use symbolic links to link the Metadata folder in your Git repository to the Metadata folder of the AOSService\PackagesLocalDirectory.

Links to longer answers

There are several blogs out there that explain how to set up your Git repository so you can use it for D365FO development in Visual Studio. One of the first was probably Using git with Dynamics 365 for Finance and Operations.

A bit more recent is Using Git with MSDyn365FO (same author) that also contains a link to another blog that explains it.

The basic idea of creating symbolic links is not something specific to D365FO and there are lots of detailed instructions out there on how to create a symbolic link. One example is The Complete Guide to Creating Symbolic Links (aka Symlinks) on Windows.

FH-Inway
  • 4,432
  • 1
  • 20
  • 37