I wrote a custom C# .dll add-in for D365FO that will reach out to google maps api. By doing so it seemed easy to integrate into a D365FO project and it was. How ever until I went to move it I realized that it requires some extra steps in order for it to be deployed to another machine via TFS/VSTS properly.
You will first need to add the reference node within visual studio to source control
However adding this referenced file into source control will not actually add the .dll to the source control like you would think. This is actually just an xml file that references the dll which can be found at K:\AOSService\PackagesLocalDirectory\[package name]\[model/project]\AxReference
In order to add the actual .dll we need to go to source control explorer and go to the main package folder and right click and choose "Add items to folder"
select the actual .dll that was added to the project from "Included to add / excluded items tabs".
This will create a bin folder in the main project node within TFS but will only include the file you selected and not every file in the folder.
At this point just check in the two files to TFS/VSTS.
To conclude it up be sure to include the following two files
K:\AOSService\PackagesLocalDirectory\[package name]\[model/project]\AxReference\
And
K:\AOSService\PackagesLocalDirectory\[package]\bin\dllname.dll
or else the package/project will not compile when loaded onto a different server/ build server.
@Rahul
For more details, please refer the below post
https://axcalated.blogspot.com/2018/08/d365fo-adding-custom-dll-to-project.html