I'm using this YAML to deploy a Package to my QA environment:
parameters:
- name: dataPackageDllPath
type: string
default: 'Data\DataPackage\bin\Debug\CDSPackage.dll'
- name: dataSolutionName
type: string
default: 'Empty'
- name: dataVsSolutionPath
type: string
default: 'Data\CDSPackage.sln'
- name: environmentName
type: string
- name: installPlatformTools
type: boolean
default: true
steps:
# -----------------
# Verify Not Dev
# -----------------
- template: VerifyNotDev.yml
parameters:
environmentName: '${{parameters.environmentName}}'
# -----------------
# Install Nuget
# -----------------
- task: NuGetToolInstaller@1
# -----------------
# Restore Nuget packages for solution
# -----------------
- task: NuGetCommand@2
inputs:
restoreSolution: '${{parameters.dataVsSolutionPath}}'
# -----------------
# Build Package
# -----------------
- task: VSBuild@1
inputs:
solution: '${{parameters.dataVsSolutionPath}}'
configuration: 'debug'
# -----------------
# Download Power Platform Tools
# -----------------
- task: PowerPlatformToolInstaller@0
inputs:
DefaultVersion: true
condition: eq(${{ parameters.installPlatformTools }}, true)
# -----------------
# Import Package
# -----------------
- task: PowerPlatformDeployPackage@0
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: '${{ parameters.environmentName }}'
PackageFile: '$(Build.SourcesDirectory)\${{ parameters.dataPackageDllPath }}'
# -----------------
# Delete Temporary Solution
# -----------------
- task: PowerPlatformDeleteSolution@0
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: '${{ parameters.environmentName }}'
SolutionName: '${{ parameters.dataSolutionName }}'
But when it runs, it fails with the following error:
2021-11-14T04:26:09.3564557Z PackageDeployer Information: 8 : Message: ************** BeforeImportStage *****************
2021-11-14T04:26:09.3583633Z PackageDeployer Information: 8 : Message: User Code Execution : OP=BeforeImportStage : Status=Execute
2021-11-14T04:26:09.3626916Z PackageDeployer Information: 8 : Message: User Code Execution : OP=BeforeImportStage : Status=Complete : Duration=00:00:00.0001749
2021-11-14T04:26:09.3629421Z PackageDeployer Information: 8 : Message: Pre-import process complete.--Complete
2021-11-14T04:26:09.3630600Z PackageDeployer Information: 8 : Message: ************** BeforeImportStage Complete *****************
2021-11-14T04:26:09.3658562Z PackageDeployer Information: 8 : Message: User Code Execution : OP=DataImportBypass : Status=Execute
2021-11-14T04:26:09.3670492Z PackageDeployer Information: 8 : Message: User Code Execution : OP=DataImportBypass : Status=Complete : Duration=00:00:00.0010173
2021-11-14T04:26:09.5856031Z PackageDeployer Information: 8 : Message: User Code Execution : OP=DataImportBypass : Status=Execute
2021-11-14T04:26:09.5879223Z PackageDeployer Information: 8 : Message: User Code Execution : OP=DataImportBypass : Status=Complete : Duration=00:00:00.0025364
2021-11-14T04:26:09.6242808Z PackageDeployer Information: 8 : Message: User Code Execution : OP=OverrideDataImportSafetyChecks : Status=Execute
2021-11-14T04:26:09.6253707Z PackageDeployer Information: 8 : Message: User Code Execution : OP=OverrideDataImportSafetyChecks : Status=Complete : Duration=00:00:00.0015628
2021-11-14T04:26:09.6906727Z VERBOSE: InProcBindingRedirect: 21 - looking to resolve assembly:
2021-11-14T04:26:09.6908034Z Microsoft.Xrm.Tooling.Dmt.DataMigCommon.XmlSerializers, Version=4.0.0.0, Culture=neutral,
2021-11-14T04:26:09.6909076Z PublicKeyToken=31bf3856ad364e35
2021-11-14T04:26:09.7322030Z PackageDeployer Information: 8 : Message: User Code Execution : OP=OverrideDateMode : Status=Execute
2021-11-14T04:26:09.7350078Z PackageDeployer Information: 8 : Message: User Code Execution : OP=OverrideDateMode : Status=Complete : Duration=00:00:00.0026525
2021-11-14T04:26:09.7359426Z PackageDeployer Information: 8 : Message: User Code Execution : OP=OverrideDataTimestamp : Status=Execute
2021-11-14T04:26:09.7370413Z PackageDeployer Information: 8 : Message: User Code Execution : OP=OverrideDataTimestamp : Status=Complete : Duration=00:00:00.0011029
2021-11-14T04:26:09.7530117Z VERBOSE: InProcBindingRedirect: 22 - looking to resolve assembly: Microsoft.Xrm.Tooling.Dmt.ImportProcessor.resources,
2021-11-14T04:26:09.7536029Z Version=4.0.0.0, Culture=en-US, PublicKeyToken=31bf3856ad364e35
2021-11-14T04:26:09.7600203Z VERBOSE: InProcBindingRedirect: 23 - looking to resolve assembly: Microsoft.Xrm.Tooling.Dmt.ImportProcessor.resources,
2021-11-14T04:26:09.7605184Z Version=4.0.0.0, Culture=en, PublicKeyToken=31bf3856ad364e35
2021-11-14T04:26:09.8269140Z PackageDeployer Information: 8 : Message: Parse Complete--Complete
2021-11-14T04:26:12.4032286Z PackageDeployer Information: 8 : Message: Schema Validation failed for Missing fields on Entities, See log for missing fields--Failed
2021-11-14T04:26:12.4045387Z PackageDeployer Information: 8 : Message: Import Process completed--Failed
2021-11-14T04:26:12.4091176Z PackageDeployer Error: 2 : Message: The complex data import is failed
2021-11-14T04:26:12.4092013Z Source : Not Provided
2021-11-14T04:26:12.4092570Z Method : Not Provided
2021-11-14T04:26:12.4093063Z Date : 4:26:12 AM
2021-11-14T04:26:12.4093575Z Time : 11/14/2021
2021-11-14T04:26:12.4094141Z Error : The complex data import is failed
2021-11-14T04:26:12.4094739Z Stack Trace : Not Provided
2021-11-14T04:26:12.4098468Z ======================================================================================================================
But when I run it locally, by building, and copying the files into the Package Deployer directory, it works perfectly without error.
What could be the issue? I'm guessing accessing the Log file would be helpful, but since it fails, I'm not sure how to do that.

Report
All responses (
Answers (