WaelHamze / dyn365-ce-vsts-tasks

VSTS Extension for Dynamics 365 Customer Engagement
https://marketplace.visualstudio.com/items?itemName=WaelHamze.xrm-ci-framework-build-tasks
GNU General Public License v3.0
117 stars 56 forks source link

Config file parsing error #11

Closed ychakka closed 5 years ago

ychakka commented 6 years ago

Hello,

I got the error "Config file parsing error"while executing the task MSCRM package deployer as part of my release pipeline. How should i debug it? Or please suggest me any solution where i am going wrong.

Thanks

stephenacrown commented 6 years ago

Hi,

Strangley, we've just been working through this problem as well, so thought I'd share our solution. ;-)

In essence, the Solution file (.zip) is not copied at build time to the correct directory (possibly something we've missed as we're new to all of this (Azure DevOps and Dynamics 365!)

The error we were receiveing below:

image

We've worked around this by copying in the missing Solution .zip file from the source directory in the build phase of the pipeline:

image

The below extension was very useful for showing what files were in place (and therefore we deduced a file was missing based on manual GUI execution of the same tool): image

Ideally, the PackageDeploy.log should be created and the following basic task should be able to upload the log file specified to the Build agent logs download (but no log file exisits...even though from reading the code, the log file should exist in the $PackageDirectory folder)

image

@WaelHamze - These are great extensions firstly. Thank you for your time creating them. Are you able to comment on the location of the PackageDeploy.log file as per the following documention? We cannot find nor can we seem to create a detailed log file for the deployment to help troubleshooting, so would be useful if you were able to advise further on this? https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/deploy-packages-using-package-deployer-windows-powershell#troubleshoot-package-deployment-issues-by-using-log-files

Hopefully this helps you and anyone else that comes across this error.

WaelHamze commented 6 years ago

@stephenacrown Thank you for your feedback and collaboration

LogWriteDirectory parameter is set to the package folder. Then I attempt to upload it to the pipeline logs in this script: https://github.com/WaelHamze/dyn365-ce-vsts-tasks/blob/master/BuildTools/Xrm.CI.Framework.BuildTools/Tasks/MSCRMPackageDeployer/MSCRMPackageDeployer.ps1

Something may have changed, so I will need to verify if this still works with latest version.

Is this what you are after?

stephenacrown commented 6 years ago

Hi,

Yes, the file you referenced is uploaded, but didn’t seem (or appear to be anyway) as verbose or provide the detail (at the time) that the PackageDeploy.log contained when we tested running via the PackageDeployer.exe GUI interface.

Apologies, this then is a misunderstanding as it appears the powershell method your extension uses outputs a differently named log file to that I referenced in the documentation from Microsoft.

WaelHamze commented 5 years ago

I think you can get the most information out of this if you set system.debug to true in the pipeline. The log file seems contains much less information than you can see in the console which is a shame.