microsoft / Dynamics-AX-Integration

Dynamics AX Integration samples and demos.
286 stars 356 forks source link

Allow Configuration.MetadataDocumentUri to use relative paths #76

Closed JohnLBevan closed 5 years ago

JohnLBevan commented 5 years ago

Currently the example code has MetadataDocumentUri pointing to a URI. However, in most scenarios a URI cannot be used; since authenticatoin would be required. In such scenarios, the solution allows a local filename to be specified. However, currently it requires that this metadata file be specified as an absolute path. This will cause issues where multiple developers are working with the same solution, but have different paths for their repositories.

To resolve this, I propose adding a new property, ProjectRelativeMetadataDocumentUri. When MetadataDocumentUri has a value this new property will be ignored. However, when ProjectRelativeMetadataDocumentUri is null the new property can be used. Host.ResolvePath(ProjectRelativeMetadataDocumentUri) can then be used when importing the configuration in ApplyParametersFromConfigurationClass() to resolve the relative path to an absolute one.

JohnLBevan commented 5 years ago

Closing as duplicate of #77