Closed eshwarboini closed 5 years ago
Sorry It's my bad. I did not provide mapping file which is required as per the task. Although I think it's not mandatory to have a mapping file always. Providing a mapping file without any tags in it resolved the issue.
Thanks
Hi,
I was trying to use the 'MSCRM Pack Solution Using Config(Preview)' task in Build Pipelines for packing the crm soutions. But as soon as i run the build, I'm facing the 'Access to the path is denied' error. As i understand i might need to set Execution Policy to bypass to resolve this issues. But the other tasks like 'MSCRM Pack Solution' doesn't need such extra permissions. Am i missing something while setting things up? Can you please help me out on this
Here is the log of build.
Log.txt
[debug]Evaluating condition for step: 'MSCRM Packs Solutions Using Config'
[debug]Evaluating: succeeded()
[debug]Evaluating succeeded:
[debug]=> True
[debug]Result: True
[section]Starting: MSCRM Packs Solutions Using Config
Task : MSCRM Pack Solutions Using Config Description : Packs Dynamics 365 Solutions using a json configuration Version : 9.0.6 Author : Wael Hamze Help : This task uses solutionpackger.exe
[debug]VstsTaskSdk 0.10.0 commit 787a46ec0a2df5b4d12c2e801bd3f319975c054c
[debug]Entering MSCRMPackSolutionsUsingConfig.ps1
[debug]INPUT_CONFIGFILEPATH: 'D:\a\1\s\Project\CRM Solutions\PackSolutionsConfig.json'
[debug]INPUT_OUTPUTFOLDER: 'D:\a\1\a'
[debug]INPUT_LOGSDIRECTORY: 'D:\a\1\s'
[debug]INPUT_SOLUTIONPACKAGERPATH: 'D:\a\1\s'
[debug]MSCRM Tools Path: D:\a\tools\MSCRMBuildTools\9.0.23
[debug]solutionpackagerpath not supplied
[debug]logFileName set to D:\a\tools\MSCRMBuildTools\9.0.23\CoreTools\9.0.0\SolutionPackager.exe
[debug]Entering PackSolutionsUsingConfig.ps1
[debug]solutionPackagerPath = D:\a\tools\MSCRMBuildTools\9.0.23\CoreTools\9.0.0\SolutionPackager.exe
[debug]OutputFolder = D:\a\1\a
[debug]ConfigFilePath = D:\a\1\s\Project\CRM Solutions\PackSolutionsConfig.json
[debug]LogsDirectory = D:\a\1\s
[debug]Script Path: D:\a\tools\MSCRMBuildTools\9.0.23\xRMCIFramework\9.0.0
[debug]Importing CIToolkit: D:\a\tools\MSCRMBuildTools\9.0.23\xRMCIFramework\9.0.0\Xrm.Framework.CI.PowerShell.Cmdlets.dll
[debug]Loading module from path 'D:\a\tools\MSCRMBuildTools\9.0.23\xRMCIFramework\9.0.0\Xrm.Framework.CI.PowerShell.Cmdlets.dll'.
[debug]Importing cmdlet 'Add-XrmEntity'.
[debug]Importing cmdlet 'Add-XrmLanguagePack'.
[debug]Importing cmdlet 'Add-XrmSolution'.
[debug]Importing cmdlet 'Add-XrmSolutionPatch'.
[debug]Importing cmdlet 'Compress-XrmCMData'.
[debug]Importing cmdlet 'Expand-XrmCMData'.
[debug]Importing cmdlet 'Expand-XrmSolution'.
[debug]Importing cmdlet 'Compress-XrmSolution'.
[debug]Importing cmdlet 'Get-XrmConnections'.
[debug]Importing cmdlet 'Get-XrmSolutionMissingDependencies'.
[debug]Importing cmdlet 'Get-XrmSolutionMissingComponents'.
[debug]Importing cmdlet 'Publish-XrmTheme'.
[debug]Importing cmdlet 'Remove-XrmConnection'.
[debug]Importing cmdlet 'Get-XrmConnection'.
[debug]Importing cmdlet 'Set-XrmConnection'.
[debug]Importing cmdlet 'Copy-XrmSolutionComponents'.
[debug]Importing cmdlet 'Export-XrmAccessTeamTemplates'.
[debug]Importing cmdlet 'Export-XrmSolutions'.
[debug]Importing cmdlet 'Export-XrmSolution'.
[debug]Importing cmdlet 'Get-XrmEntities'.
[debug]Importing cmdlet 'Get-XrmEntity'.
[debug]Importing cmdlet 'Get-XrmLanguagePacks'.
[debug]Importing cmdlet 'Get-XrmPluginRegistrationClass'.
[debug]Importing cmdlet 'Get-XrmPluginRegistrationFromAssembly'.
[debug]Importing cmdlet 'Get-XrmServiceEndpointRegistration'.
[debug]Importing cmdlet 'Get-XrmPluginRegistration'.
[debug]Importing cmdlet 'Get-XrmSolutionPatches'.
[debug]Importing cmdlet 'Get-XrmSolution'.
[debug]Importing cmdlet 'Get-XrmSolutionImportLog'.
[debug]Importing cmdlet 'Get-XrmSolutionInfoFromFolder'.
[debug]Importing cmdlet 'Get-XrmSolutionInfoFromZip'.
[debug]Importing cmdlet 'Import-XrmAccessTeamTemplates'.
[debug]Importing cmdlet 'Import-XrmSolutions'.
[debug]Importing cmdlet 'Merge-XrmSolution'.
[debug]Importing cmdlet 'Import-XrmSolution'.
[debug]Importing cmdlet 'Merge-XrmSolutionPatches'.
[debug]Importing cmdlet 'New-XrmBulkDeleteJob'.
[debug]Importing cmdlet 'New-XrmEntity'.
[debug]Importing cmdlet 'Publish-XrmCustomizations'.
[debug]Importing cmdlet 'Publish-XrmDuplicateRule'.
[debug]Importing cmdlet 'Remove-XrmEntityAttribute'.
[debug]Importing cmdlet 'Remove-XrmEntity'.
[debug]Importing cmdlet 'Remove-XrmOption'.
[debug]Importing cmdlet 'Remove-XrmWorkflow'.
[debug]Importing cmdlet 'Remove-XrmRecord'.
[debug]Importing cmdlet 'Set-XrmDashboardRole'.
[debug]Importing cmdlet 'Set-XrmEntityState'.
[debug]Importing cmdlet 'Set-XrmWorkflowState'.
[debug]Importing cmdlet 'Compress-XrmSolutions'.
[debug]Importing cmdlet 'Show-XrmLogging'.
[debug]Importing cmdlet 'Remove-XrmSolutionComponents'.
[debug]Importing cmdlet 'Select-WhoAmI'.
[debug]Importing cmdlet 'Remove-XrmPluginAssembly'.
[debug]Importing cmdlet 'Set-XrmServiceEndpointRegistration'.
[debug]Importing cmdlet 'Set-XrmWebResourcesFromFolder'.
[debug]Importing cmdlet 'Set-XrmWebResource'.
[debug]Importing cmdlet 'Set-XrmPluginAssembly'.
[debug]Importing cmdlet 'Set-XrmEntity'.
[debug]Importing cmdlet 'Set-XrmSolutionVersion'.
[debug]Importing cmdlet 'Set-XrmSolutionVersionInFolder'.
[debug]Importing cmdlet 'Split-XrmPluginAssembly'.
[debug]Importing cmdlet 'Set-XrmPluginRegistration'.
[debug]Imported CIToolkit
Packing Solutions
[debug]PS Version: 5.1.14393.3053
Packing Solution using config: D:\a\1\s\Project\CRM Solutions\PackSolutionsConfig.json
[debug]Packing Solution from: D:\a\1\s\Project\CRM Solutions\Managed\FirstDummySolution
Packing Solution Name: Firstdummysolution - Version 1.0
[debug]zipFile: D:\a\1\a\Firstdummysolution_1_0.zip
[debug]log: D:\a\1\s\PackagerLog_Firstdummysolution_1_0_2019_09_24__14_00.txt
[debug]Generating Solution Packager Arguments
Solution Packager Version: 9.1.0.13 Solution Packager Arguments: /action:Pack /zipFile:"D:\a\1\a\Firstdummysolution_1_0.zip" /folder:"D:\a\1\s\Project\CRM Solutions\Managed\FirstDummySolution" /packageType:Unmanaged /errorlevel:Verbose /map:"D:\a\1\s\Project\CRM Solutions" /nologo /log:"D:\a\1\s\PackagerLog_Firstdummysolution_1_0_2019_09_24__14_00.txt"
[debug]Invoking SolutionPackager: D:\a\tools\MSCRMBuildTools\9.0.23\CoreTools\9.0.0\SolutionPackager.exe
Access to the path 'D:\a\1\s\Project\CRM Solutions' is denied. See log file 'D:\a\1\s\PackagerLog_Firstdummysolution_1_0_2019_09_24__14_00.txt' for details. SolutionPackager: Exception thrown: System.UnauthorizedAccessException: Access to the path 'D:\a\1\s\Project\CRM Solutions' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost) at System.IO.File.ReadAllText(String path) at Microsoft.Crm.Tools.SolutionPackager.Filer.Initialize(PackagerArguments arguments) at Microsoft.Crm.Tools.SolutionPackager.SolutionPackager..ctor(PackagerArguments arguments) at Microsoft.Crm.Tools.SolutionPackager.Program.Main(String[] args), returning error code '1' CrmSvcUtil Runtime = 00:00:01.0651699 SolutionPackager exit code: 1 1 solutions processed out of 2 Exception Caught: Packing Solutions failed. Check logs for more information
[debug]Uploading pack log files
[debug]Uploading pack log D:\a\1\s\PackagerLog_Firstdummysolution_1_0_2019_09_24__14_00.txt
[debug]Processed: ##vso[task.uploadfile]D:\a\1\s\PackagerLog_Firstdummysolution_1_0_2019_09_24__14_00.txt
[debug]Pack log uploaded D:\a\1\s\PackagerLog_Firstdummysolution_1_0_2019_09_24__14_00.txt
[debug]Completed uploading pack log files
[debug]Caught exception from task script.
[debug]Error record:
[debug]Compress-XrmSolutions : Packing Solutions failed. Check logs for more information
[debug]At D:\a\tools\MSCRMBuildTools\9.0.23\xRMCIFramework\9.0.0\PackSolutionsUsingConfig.ps1:37 char:12
[debug]+ $results = Compress-XrmSolutions -solutionPackagerPath "$solutionPack ...
[debug]+
~~~~~~~~~~~~~~[debug] + CategoryInfo : NotSpecified: (:) [Compress-XrmSolutions], Exception
[debug] + FullyQualifiedErrorId : System.Exception,Xrm.Framework.CI.PowerShell.Cmdlets.CompressXrmSolutionsUsingConfig
[debug]
[debug]Script stack trace:
[debug]at, D:\a\tools\MSCRMBuildTools\9.0.23\xRMCIFramework\9.0.0\PackSolutionsUsingConfig.ps1: line 37
[debug]at, D:\a_tasks\MSCRMPackSolutionsUsingConfig_33dbb312-a641-4111-8c3e-81f589b41a74\9.0.6\MSCRMPackSolutionsUsingConfig.ps1: line 46
[debug]at, : line 1
[debug]at, : line 22
[debug]at, : line 18
[debug]at, : line 1
[debug]Exception:
[debug]System.Exception: Packing Solutions failed. Check logs for more information
[debug] at Xrm.Framework.CI.PowerShell.Cmdlets.CompressXrmSolutionsUsingConfig.ProcessRecord()
[debug] at System.Management.Automation.CommandProcessor.ProcessRecord()
[error]Packing Solutions failed. Check logs for more information
[debug]Processed: ##vso[task.logissue type=error]Packing Solutions failed. Check logs for more information
[debug]Processed: ##vso[task.complete result=Failed]
[section]Finishing: MSCRM Packs Solutions Using Config