d365collaborative / d365fo.tools

Tools used for Dynamics 365 Finance and Operations
MIT License
246 stars 101 forks source link

Enable partial database synchronisation for binary only packages #516

Closed FH-Inway closed 3 years ago

FH-Inway commented 3 years ago

The internal Get-SyncElements function is used to create lists of elements that can be synchronized with the database. The function uses the Metadata API and specifically the DiskProvider version of the IMetadataProvider interface. This provider works with the xml files that make up the source code of a module.

However, modules can also be provided as deployable packages that only contain the binary/compiled module without the source code (e.g. ISV solutions). In this case, the Get-SyncElements function will find no elements. This means that no partial sync can be done with the d365fo.tools for binary only modules.

I propose that instead of the DiskProvider, the RuntimeProvider is used to retrieve the synchronizable elements.

fhoo commented 3 years ago

I‘d also vote for using the RuntimeProvider, as the database should be in sync with what gets executed, not what is currently modified and not compiled. Also the standard DB sync runs against the compiled DLLs and not the XMLs as far as I know.

Splaxi commented 3 years ago

Anyone up for the challenge to make the PR?

Splaxi commented 3 years ago

0.6.53 should contain the fix.