You can watch the Getting Started with Power DevOps Tools video on YouTube
You can install and download this Power DevOps Tools extension from the Azure DevOps Marketplace
VSTS Extension for Dynamics 365 Customer Engagement
Home Page: https://marketplace.visualstudio.com/items?itemName=WaelHamze.xrm-ci-framework-build-tasks
License: GNU General Public License v3.0
You can watch the Getting Started with Power DevOps Tools video on YouTube
You can install and download this Power DevOps Tools extension from the Azure DevOps Marketplace
Is there a way to list all managed/unmanaged solutions from a crm environment using this toolkit?
Hi,
Before my request I want to say thanks you for your very usefull extension.
Today, I've got a new scenario on authentication to use an AppID and a secret to replace the connectionstring.
Do you think to realize this feature in future release ? And if yes, have you got an release date ?
Kind Regards;
Antoine L.
When exporting an unmanaged solution from, the job takes 30mins and then gets canceled by the agent.
manually exporting this solution takes 6mins.
2019-02-26T13:12:10.9665846Z ##[section]Starting: MSCRM Export Solution: Cegeka_XrmAddOns_Icons Unmanaged
2019-02-26T13:12:10.9773444Z ==============================================================================
2019-02-26T13:12:10.9773519Z Task : MSCRM Export Solution
2019-02-26T13:12:10.9773555Z Description : Exports a CRM Solution from the source CRM environment
2019-02-26T13:12:10.9773609Z Version : 10.0.2
2019-02-26T13:12:10.9774201Z Author : Wael Hamze
2019-02-26T13:12:10.9774236Z Help : More information here: https://msdn.microsoft.com/en-us/library/microsoft.crm.sdk.messages.exportsolutionrequest.aspx
2019-02-26T13:12:10.9774286Z ==============================================================================
2019-02-26T13:12:11.7646329Z Exporting Unmanaged Solution
2019-02-26T13:41:45.5968294Z ##[error]The agent has received a shutdown signal. This can happen when the agent service is stopped, or a manually started agent is canceled.
2019-02-26T13:41:55.6953750Z ##[error]The operation was canceled.
2019-02-26T13:41:55.6959515Z ##[section]Finishing: MSCRM Export Solution: Cegeka_XrmAddOns_Icons Unmanaged
2019-02-26T13:41:55.7044330Z ##[section]Starting: Finalize Job
2019-02-26T13:41:55.7085327Z Start cleaning up orphan processes.
2019-02-26T13:41:55.7240275Z ##[section]Finishing: Finalize Job
2019-02-26T13:41:55.7293270Z ##[section]Finishing: Job
Hello,
I am using your MSCRM Pack solution task to pack all my CRM xml assets into deployable format in my build pipeline. But i encountered following error at your Pack solution task "MSCRM_Tools_path not found. Add MSCRM Tools Installer before this task".
What does it mean? Do i need to install any other extension apart from this? Please help me to resolve this.
Thanks in advance
Hi all
We have an issue when using the Tools. Everything works fine except when we deploy Plugin Steps . Once the solution is imported into the Target CRM all SDK Message Processing Steps are disabled.
Does anyone found a workaround for this issue?
Cheers,
Miguel
I found a post that scripted a way around this issue:
https://community.dynamics.com/crm/b/sonomapartners/archive/2016/01/05/deploy-dynamics-crm-with-powershell-part-1-duplicate-detection-rules
Maybe you can implement this too? I also have the feeling that this can work for Workflows too.
I'm trying to automate the deployment of some files and then want to export the resulting solution (both managed and unmanaged). I'm running into problems. This is being done on a Dynamics 365 instance.
The two tasks that I'm running are (obviously) Update Web Resources and Export Solution.
I have the appropriate json mapping file built and checked into my repository and it is formatted correctly. When I run my build everything appears to be working correctly. All of the logs say it's working, but I'm seeing strange behavior.
When I look at the web resource files, the files haven't changed. Also, on the Export Solution task I have it set to update the solution version. Again, the logs appear to show it's working but the solution version never changed.
Here's where it gets strange: When I take the exported unmanaged solution zip file and open it up, my file changes are in there. How?
The next strange part: When I run the cmdlets directly from powershell (Set-XrmWebResource and Set-XrmSolutionVersion) then everything works. Files are updated and/or solution version is changed. The output from those looks identical to the output from the build tasks in Azure Devops.
I don't understand why it's working in one context but not in another.
Can anybody help?
I'd like to update the namespace when I do a release.
Trying to use the endpoint registration with an upset. What should the json file look like?
Thanks
Norbert
It would be nice to have the ability to automatically extract data using the Configuration Migration tool from a source environment using a pre-defined Export Schema as part of a Build definition, and then be able to use the export in the Package Deployer package in a later step. Further, I would want to unpack/pack the extracted data into TFS similar to the way Solution Packager works.
We are trying to pass 2 Values to one look up field.
Example
LookupField - Name
Value fields - Field1, Field2
Field2 is a simple Yes/No optionset. What is the correct way to represent the 'A json array of lookup/value pairs' and the Yes value of Optionset.
we have tried
[['TestKey','TestValue3', 'True']]
[['TestKey','TestValue3', 1]]
[['TestKey','TestValue3', '1']]
But all of them error out with "
System.InvalidCastException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #A36422D1"
What are we doing wrong ?
Any help will be very appreciated.
Trying to leverage these scripts against a brand new D365 Online organization, using OAuth, and I am getting null reference exceptions upon logging into CRM. I tracked it down in the code to the line:
crmServiceClient.OrganizationServiceProxy.Timeout = new TimeSpan(0, 0, DefaultTime);
the OrganizationServiceProxy object is null. I extracted the connection method out to a console app, and gave it the same connection string - the OSP is null, but the OrganizationWebProxyClient is not null.
Connection string looks like this:
Url=https://orgname.crm.dynamics.com; AuthType=OAuth; AppId={guid}; RedirectUri=https://orgname.crm.dynamics.com
the App ID is registered in AzureAD and my user account has authenticated with it successfully. Ideas?
I have built a Azure Devops Pipeline build that uses the MSCRM Export Solution task. It is failing with a invalid number of components in version. I tried with an existing solution and a new solution in my CRM enviornment. Something I have configured wrong? Our D365 CRM version is Version 1710 (9.1.0.1117) online Thanks!
Hi,
I use Get-XrmPluginRegistration to generate JSON with plugin definitions.
Step for Associate plugin looks as follows:
{
"Id": "c8174b36-a391-42e8-a1e4-0854fc15d200",
"Description": null,
"Name": "xxx",
"FriendlyName": "4e54d6f4-4742-4358-23d3-499d39f7bd42",
"TypeName": "xxx",
"Steps": [
{
"Id": "516934fd-2ad7-e611-80df-005056b355bf",
"Name": "xxx: Associate of any Entity",
"MessageName": "None",
"Description": "xxx: Associate of any Entity",
"CustomConfiguration": null,
"FilteringAttributes": null,
"ImpersonatingUserFullname": "",
"Mode": "Synchronous",
"PrimaryEntityName": "none",
"Rank": 1,
"Stage": "Postoperation",
"SupportedDeployment": "ServerOnly",
"Images": []
}
],
"WorkflowActivityGroupName": null
}
When later on I try to deploy DLL using generated JSON with Set-XrmPluginRegistration I get following error:
sdkmessage With Id = 00000000-0000-0000-0000-000000000000 Does Not Exist
The same problem happens for Assign and CalculatePrice message. I suspect this relates to MessageName being set as None instead of correct message name
Hi,
I cannot get Dynamics 365 API Backup to Azure working as per error below:
This is documented Dynamics 365 CE API shows this as a supported target destination, and is also included in the tasks in this marketplace extension (again presumably because it is documented!)
Has anyone else got this working or using it?
If not, are there any thoughts on workarounds for backups to somewhere else (to protect against an instance/environment deletion which takes all backups along with it for example)?
I have raised this with Microsoft as well, and will post back here any findings.
Enhancement:
When we publish the entire solution, sometimes we get a generic SQL error. Could you add a feature to publish few entities at once. Currently we are using sdk to call RetrieveAllEntitiesRequest and publishing few entities at once and it's working fine.
public void PublishInChuncks(string server, string param_ORGName, int param_iTotalEntitiesToPublish)
{
int iCount = 0;
int iCountStatus = 0;
int iTotalEntityCount = 0;
PublishXmlRequest pubRequest = new PublishXmlRequest();
PublishXmlResponse publishResponse = new PublishXmlResponse();
RetrieveAllEntitiesRequest objRetrieveAllEntityRequest = new RetrieveAllEntitiesRequest();
RetrieveAllEntitiesResponse objRetrieveAllEntityResponse = new RetrieveAllEntitiesResponse();
StringBuilder sbImportXML = new StringBuilder("<importexportxml><entities>");
// Retrieve the MetaData.
objRetrieveAllEntityRequest.RetrieveAsIfPublished = true; // Set this value to true to include unpublished changes, as it would look if you called publish
objRetrieveAllEntityRequest.EntityFilters = EntityFilters.Entity;
objRetrieveAllEntityResponse = _proxy.Execute(objRetrieveAllEntityRequest);
iTotalEntityCount = objRetrieveAllEntityResponse.EntityMetadata.Count - 1;
for (int index = 0; index <= iTotalEntityCount; index++)
{
if (objRetrieveAllEntityResponse.EntityMetadata(index).IsCustomizable.Value == true)
sbImportXML.Append("<entity>" + objRetrieveAllEntityResponse.EntityMetadata(index).LogicalName + "</entity>" + Environment.NewLine);
if ((iCount == param_iTotalEntitiesToPublish))
{
sbImportXML.Append("</entities></importexportxml>");
// Create new Publish Request
pubRequest = new PublishXmlRequest();
pubRequest.ParameterXml = sbImportXML.ToString();
publishResponse = _proxy.Execute(pubRequest);
iCountStatus = iCountStatus + iCount;
ReportStatus?.Invoke("Published " + iCountStatus + " out of " + iTotalEntityCount + " Entities");
iCount = 0;
sbImportXML = new StringBuilder("<importexportxml><entities>");
}
iCount = iCount + 1;
}
_proxy.Dispose();
return AccessResult.Success;
}
Getting the following error using MSCRM Export Solution task in DevOps
Exporting Unmanaged Solution
##[warning]Unable to Login to Dynamics CRM
##[warning]Unable to Login to Dynamics CRM
##[warning]Unable to Login to Dynamics CRM
##[error]Couldn't connect to CRM instance after 3 attempts: Unable to Login to Dynamics CRM
##[section]Finishing: MSCRM Export Solution: RDTaxIncentive
Connection string is AuthType=Office365;Url=https://xxxx.crm6.dynamics.com;UserName=xxx@xxx;Password=xxx
I can log directly onto that CRM instance and can also run Export-XrmSolution powershell script from my dev box with same connection string and it works.
Hi,
We are using this to publish in to a 8.2 Environment and are having issues where some of the components are not getting updated. These components are getting updated when the solution import is done manually.
Just to add to that, imports in to a creal OOB organization work fine, this problem is noticed only where there are existing solutions and new versions of the solution are being pushed.
I am wondering if this is related to the fact that the SDK used in the tool is >9.0.
Is there a version of the tool with 8.2 SDK ?
Thanks
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
Hi Wael,
we are using your tasks on our VSTS for automated deployment. After upgrading our instances to v9.1 the builds don't run successfully anymore: The PublishCustomizations tasks runs into timeout after an hour or so without any error. If I do Publish All on the web client, everything works fine after some moments.
Do you have any experience with this issue and any advice, how we could resolve this?
Cheers,
Joe
Hi, I am receiving the following error when the Backup task runs in VSTS:
2018-11-08T11:58:39.0393749Z ##[debug]Entering BackupCRMOnlineInstance.ps1
2018-11-08T11:58:39.0426165Z ##[debug]ApiUrl = https://admin.services.crm4.dynamics.com
2018-11-08T11:58:39.0460974Z ##[debug]Username = xxxxxxxxxxxxxxxxxx
2018-11-08T11:58:39.3812544Z ##[debug]InstanceName = xxxxxxxxxxxx
2018-11-08T11:58:39.3902425Z ##[debug]BackupLabel = xxxxxxxxxxx
2018-11-08T11:58:39.3904277Z ##[debug]BackupNotes =
2018-11-08T11:58:39.4069920Z ##[debug]IsAzureBackup = False
2018-11-08T11:58:39.4070831Z ##[debug]ContainerName =
2018-11-08T11:58:39.4071444Z ##[debug]StorageAccountKey =
2018-11-08T11:58:39.4072005Z ##[debug]StorageAccountName =
2018-11-08T11:58:39.4072547Z ##[debug]WaitForCompletion = True
2018-11-08T11:58:39.4073161Z ##[debug]SleepDuration = 5
2018-11-08T11:58:39.4073712Z ##[debug]PSModulePath = D:_work\tools\MSCRMBuildTools\9.0.3\OnlineManagementAPI\1.0.0
2018-11-08T11:58:39.4183271Z ##[debug]Script Path: D:_work\tools\MSCRMBuildTools\9.0.3\xRMCIFramework\9.0.0
2018-11-08T11:58:39.4378853Z ##[debug]Current Security Protocol: Ssl3, Tls
2018-11-08T11:58:39.4552740Z ##[debug]Modified Security Protocol: Ssl3, Tls, Tls11, Tls12
2018-11-08T11:58:39.4588871Z ##[debug]Importing Online Management Module: D:_work\tools\MSCRMBuildTools\9.0.3\OnlineManagementAPI\1.0.0\Microsoft.Xrm.OnlineManagementAPI.dll
2018-11-08T11:58:39.4617436Z ##[debug]Loading module from path 'D:_work\tools\MSCRMBuildTools\9.0.3\OnlineManagementAPI\1.0.0\Microsoft.Xrm.OnlineManagementAPI.dll'.
2018-11-08T11:58:39.5777464Z ##[debug]Importing cmdlet 'New-CrmAdminModeSetting'.
2018-11-08T11:58:39.5803964Z ##[debug]Importing cmdlet 'Get-CrmInstance'.
2018-11-08T11:58:39.5830835Z ##[debug]Importing cmdlet 'New-CrmInstanceInfo'.
2018-11-08T11:58:39.5858116Z ##[debug]Importing cmdlet 'New-CrmBackupInfo'.
2018-11-08T11:58:39.5884881Z ##[debug]Importing cmdlet 'Backup-CrmInstance'.
2018-11-08T11:58:39.5911355Z ##[debug]Importing cmdlet 'Get-CrmCurrencies'.
2018-11-08T11:58:39.5940845Z ##[debug]Importing cmdlet 'Get-CrmInstanceBackup'.
2018-11-08T11:58:39.5967430Z ##[debug]Importing cmdlet 'Get-CrmInstanceBackups'.
2018-11-08T11:58:39.6003678Z ##[debug]Importing cmdlet 'Get-CrmInstances'.
2018-11-08T11:58:39.6029703Z ##[debug]Importing cmdlet 'Get-CrmInstanceTypes'.
2018-11-08T11:58:39.6056386Z ##[debug]Importing cmdlet 'Get-CrmLanguages'.
2018-11-08T11:58:39.6083396Z ##[debug]Importing cmdlet 'Get-CrmOperationStatus'.
2018-11-08T11:58:39.6110071Z ##[debug]Importing cmdlet 'Get-CrmServiceVersions'.
2018-11-08T11:58:39.6137692Z ##[debug]Importing cmdlet 'Get-CrmTemplates'.
2018-11-08T11:58:39.6172908Z ##[debug]Importing cmdlet 'New-CrmInstance'.
2018-11-08T11:58:39.6200542Z ##[debug]Importing cmdlet 'Restore-CrmInstance'.
2018-11-08T11:58:39.6227479Z ##[debug]Importing cmdlet 'Disable-CrmAdminMode'.
2018-11-08T11:58:39.6257527Z ##[debug]Importing cmdlet 'Enable-CrmAdminMode'.
2018-11-08T11:58:39.6284036Z ##[debug]Importing cmdlet 'Remove-CrmInstance'.
2018-11-08T11:58:39.6311898Z ##[debug]Importing cmdlet 'Remove-CrmManagementApp'.
2018-11-08T11:58:39.6338058Z ##[debug]Importing cmdlet 'Disable-CrmManagementApp'.
2018-11-08T11:58:39.6362532Z ##[debug]Importing cmdlet 'Enable-CrmManagementApp'.
2018-11-08T11:58:39.6389439Z ##[debug]Importing cmdlet 'Get-CrmInstanceType'.
2018-11-08T11:58:39.6417469Z ##[debug]Importing cmdlet 'Get-CrmManagementApp'.
2018-11-08T11:58:39.6444655Z ##[debug]Importing cmdlet 'Get-CrmManagementApps'.
2018-11-08T11:58:39.6472263Z ##[debug]Importing cmdlet 'New-CrmManagementApp'.
2018-11-08T11:58:39.6509214Z ##[debug]Imported Online Management Module
2018-11-08T11:58:39.6708347Z ##[debug]Entering OnlineInstanceFunctions.ps1
2018-11-08T11:58:39.6734381Z ##[debug]Leaving OnlineInstanceFunctions.ps1
2018-11-08T11:58:39.6848321Z ##[debug]Connecting to API server: https://admin.services.crm4.dynamics.com/
2018-11-08T11:58:39.9957693Z ##[debug]Entering GetCrmInstances - ProcessRecord
2018-11-08T11:58:39.9993939Z ##[debug]Executing GetCrmInstances
2018-11-08T11:58:40.5752106Z ##[debug]Requesting Authentication - Start
2018-11-08T11:58:40.5798183Z ##[debug]Requesting Authority From server - Start
2018-11-08T11:58:40.6895327Z ##[debug]Requesting Authority From server - Finished : 00:00:00.1089584
2018-11-08T11:58:42.4971859Z ##[debug]Requesting Authentication - Completed : 00:00:01.9281283
2018-11-08T11:58:43.8590350Z ##[debug]Exiting GetCrmInstances - ProcessRecord : 00:00:03.8603934
2018-11-08T11:58:43.8697208Z Backing up instance nos-sandbox + ed522186-f1e8-4ee5-a3cb-e13a9c320d1c
2018-11-08T11:58:43.8797693Z ##[debug]Entering CrmBackupInfo - ProcessRecord
2018-11-08T11:58:43.8822950Z ##[debug]Executing CrmBackupInfo
2018-11-08T11:58:43.8849099Z ##[debug]Exiting CrmBackupInfo - ProcessRecord : 00:00:00.0025292
2018-11-08T11:58:43.8903373Z ##[debug]Connecting to API server: https://admin.services.crm4.dynamics.com/
2018-11-08T11:58:43.8942036Z ##[debug]Entering BackupCrmInstance - ProcessRecord
2018-11-08T11:58:43.8968338Z ##[debug]Executing BackupCrmInstance
2018-11-08T11:58:43.9759552Z ##[debug]Requesting Authentication - Start
2018-11-08T11:58:43.9784444Z ##[debug]Requesting Authority From server - Start
2018-11-08T11:58:43.9881748Z ##[debug]Requesting Authority From server - Finished : 00:00:00.0088542
2018-11-08T11:58:44.2334234Z ##[debug]Requesting Authentication - Completed : 00:00:00.2574935
2018-11-08T11:58:44.5561143Z ##[debug]Failed GetCrmCurrencys - ProcessRecord : 00:00:00.6578509
2018-11-08T11:58:44.6490080Z ##[debug]Message: Operation returned an invalid status code 'InternalServerError'
2018-11-08T11:58:44.6518586Z ##[debug]Source : Xrm.Online.Admin.Client
2018-11-08T11:58:44.6539918Z ##[debug]Method : MoveNext
2018-11-08T11:58:44.6563322Z ##[debug]Date : 11/8/2018
2018-11-08T11:58:44.6580979Z ##[debug]Time : 11:58:44 AM
2018-11-08T11:58:44.6603203Z ##[debug]Error : Operation returned an invalid status code 'InternalServerError'
2018-11-08T11:58:44.6626350Z ##[debug]Stack Trace : at Microsoft.Xrm.Services.Admin.Client.D365CEAdminClient.d__28.MoveNext()
2018-11-08T11:58:44.6648481Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2018-11-08T11:58:44.6669684Z ##[debug] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2018-11-08T11:58:44.6690484Z ##[debug] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2018-11-08T11:58:44.6712415Z ##[debug] at Microsoft.Xrm.Services.Admin.Client.D365CEAdminClientExtensions.d__5.MoveNext()
2018-11-08T11:58:44.6733874Z ##[debug]--- End of stack trace from previous location where exception was thrown ---
2018-11-08T11:58:44.6754086Z ##[debug] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2018-11-08T11:58:44.6775444Z ##[debug] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2018-11-08T11:58:44.6800726Z ##[debug] at Microsoft.Xrm.Services.Admin.Client.D365CEAdminClientExtensions.BackupInstance(ID365CEAdminClient operations, NewInstanceBackup backupInfo)
2018-11-08T11:58:44.6822195Z ##[debug] at Microsoft.Xrm.OnlineManagementAPI.BackupCrmInstance.ProcessRecord()
2018-11-08T11:58:44.6843619Z ##[debug]======================================================================================================================
2018-11-08T11:58:44.6867401Z ##[debug]
2018-11-08T11:58:44.8986080Z ##[debug]Caught exception from task script.
2018-11-08T11:58:44.9033785Z ##[debug]Error record:
2018-11-08T11:58:45.0106027Z ##[debug]Backup-CrmInstance : Operation returned an invalid status code 'InternalServerError'
2018-11-08T11:58:45.0121829Z ##[debug]At D:_work\tools\MSCRMBuildTools\9.0.3\xRMCIFramework\9.0.0\BackupOnlineInstance.ps1:75 char:14
2018-11-08T11:58:45.0143770Z ##[debug]+ ... operation = Backup-CrmInstance -ApiUrl $ApiUrl -BackupInfo $backupInf ...
2018-11-08T11:58:45.0164051Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-11-08T11:58:45.0185053Z ##[debug] + CategoryInfo : NotSpecified: (:) [Backup-CrmInstance], HttpOperationException
2018-11-08T11:58:45.0203504Z ##[debug] + FullyQualifiedErrorId : Microsoft.Rest.HttpOperationException,Microsoft.Xrm.OnlineManagementAPI.BackupCrmInstanc e
2018-11-08T11:58:45.0220227Z ##[debug]
2018-11-08T11:58:45.0246686Z ##[debug]Script stack trace:
2018-11-08T11:58:45.0295944Z ##[debug]at , D:_work\tools\MSCRMBuildTools\9.0.3\xRMCIFramework\9.0.0\BackupOnlineInstance.ps1: line 75
2018-11-08T11:58:45.0311371Z ##[debug]at , D:_work_tasks\MSCRMBackupOnlineInstance_0c3e661c-d316-443e-9a77-470989da8e29\10.0.1\MSCRMBackupOnlineInstance.ps1: line 47
2018-11-08T11:58:45.0330768Z ##[debug]at , : line 1
2018-11-08T11:58:45.0348200Z ##[debug]at , : line 22
2018-11-08T11:58:45.0778164Z ##[debug]at , : line 18
2018-11-08T11:58:45.0797583Z ##[debug]at , : line 1
2018-11-08T11:58:45.0824437Z ##[debug]Exception:
2018-11-08T11:58:45.0887244Z ##[debug]Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'InternalServerError'
2018-11-08T11:58:45.0906707Z ##[debug] at Microsoft.Xrm.OnlineManagementAPI.BackupCrmInstance.ProcessRecord()
2018-11-08T11:58:45.0927428Z ##[debug] at System.Management.Automation.CommandProcessor.ProcessRecord()
2018-11-08T11:58:45.1304717Z ##[error]Operation returned an invalid status code 'InternalServerError'
2018-11-08T11:58:45.1314285Z ##[debug]Processed: ##vso[task.logissue type=error]Operation returned an invalid status code 'InternalServerError'
2018-11-08T11:58:45.1334123Z ##[debug]Processed: ##vso[task.complete result=Failed]
Any ideas? I am using the latest versions of the tasks from Marketplace. Do I just need to downgrade my task version? (I would just try it but i don't have a system that i can try adhoc release on at the moment).
When including a data.zip file in the ImportConfig.xml tag the import fails. Import successful when data.zip removed. Unsure if this is 9.1 related or not. When taking the very same package including the data.zip and deploying manually using the package deployer through the desktop, the deployment is successful.
2018-10-19T07:37:38.1747332Z PackageDeployer Information: 8 : User Code Execution : OP=DataImportBypass : Status=Execute
2018-10-19T07:37:38.1754434Z PackageDeployer Information: 8 : User Code Execution : OP=DataImportBypass : Status=Complete : Duration=00:00:00.0010045
2018-10-19T07:37:38.1946943Z PackageDeployer Information: 8 : User Code Execution : OP=OverrideDataImportSafetyChecks : Status=Execute
2018-10-19T07:37:38.1953652Z PackageDeployer Information: 8 : User Code Execution : OP=OverrideDataImportSafetyChecks : Status=Complete : Duration=00:00:00.0006990
2018-10-19T07:37:38.2472444Z PackageDeployer Information: 8 : User Code Execution : OP=OverrideDateMode : Status=Execute
2018-10-19T07:37:38.2485776Z PackageDeployer Information: 8 : User Code Execution : OP=OverrideDateMode : Status=Complete : Duration=00:00:00.0016394
2018-10-19T07:37:38.2492130Z PackageDeployer Information: 8 : User Code Execution : OP=OverrideDataTimestamp : Status=Execute
2018-10-19T07:37:38.2501245Z PackageDeployer Information: 8 : User Code Execution : OP=OverrideDataTimestamp : Status=Complete : Duration=00:00:00.0006939
2018-10-19T07:37:41.1855766Z PackageDeployer Information: 8 : ****** PACKAGE DEPLOYMENT PROCESS COMPLETED. Result:FAILED Duration:00:10:07.4264882 ******
2018-10-19T07:37:41.1863796Z PackageDeployer Information: 8 : ****** PACKAGE DEPLOYMENT PROCESS COMPLETED. Result:FAILED Duration:00:10:07.4264882 ******
2018-10-19T07:37:41.4326828Z ##[error]The complex data import is complete.
2018-10-19T07:37:41.8131514Z ##[error]Import Failed
We have upgraded the import task to version 11 and seeing below issue. Even previous versions are not working. These were working fine before upgrade.
2019-01-04T21:25:11.8439006Z ##[section]Starting: MSCRM Import Solution
2019-01-04T21:25:11.8444349Z ==============================================================================
2019-01-04T21:25:11.8444854Z Task : MSCRM Import Solution
2019-01-04T21:25:11.8445063Z Description : Import a Dynamics CRM Solution package
2019-01-04T21:25:11.8445254Z Version : 11.0.1
2019-01-04T21:25:11.8445489Z Author : Wael Hamze
2019-01-04T21:25:11.8445693Z Help : This task invokes ImportSolutionRequest in Async mode
2019-01-04T21:25:11.8445944Z ==============================================================================
2019-01-04T21:25:14.2212497Z ##[error]Method not found: 'Void System.Management.Automation.Cmdlet.WriteInformation(System.Object, System.String[])'.
2019-01-04T21:25:14.2407168Z ##[section]Finishing: MSCRM Import Solution ACH_Base
I'm using the MSCRM Plugin Registration task, but when trying to register a plugin on an (unbound) action, the following error occurs "sdkmessagefilter With Id = 00000000-0000-0000-0000-000000000000 Does Not Exist". I have checked if the messagename is available by querying the sdkmessages (https://mycrm/api/data/v9.0/sdkmessages?$filter=name%20eq%20%27**vuz_GenerateBuildingPhases**%27), and that is the case. Is there any property missing in the configuration (PluginRegistrationMapping.json) ?
PluginRegistrationMapping.json
{
"Name": "MyProject.Plugins.dll",
"IsolationMode": "Sandbox",
"SourceType": "Database",
"PluginTypes": [
{
"Description": null,
"Name": "MyProject.Plugins.GenerateBuildingPhases",
"FriendlyName": "70537E41-447E-4803-A484-97643D348F18",
"TypeName": "MyProject.Plugins.GenerateBuildingPhases",
"Steps": [
{
"Name": "MyProject.Plugins.GenerateBuildingPhases: Action vuz_GenerateBuildingPhases",
"MessageName": "vuz_GenerateBuildingPhases",
"Description": "MyProject.Plugins.GenerateBuildingPhases: Action vuz_GenerateBuildingPhases",
"CustomConfiguration": null,
"FilteringAttributes": null,
"ImpersonatingUserFullname": null,
"Mode": "Synchronous",
"PrimaryEntityName": null,
"Rank": 1,
"Stage": "Postoperation",
"SupportedDeployment": "ServerOnly",
"Images": []
}
]
}
]
}
Output of the query "https://mycrm/api/data/v9.0/sdkmessages?$filter=name%20eq%20%27vuz_GenerateBuildingPhases%27"
Hello,
Have couple of questions regarding the tasks which are part of your MSCRM data tools.
MSCRM Delete Instance (Will this really delete my whole CRM instance? or i misread it. Please help me what it actually does?)
MSCRM Online provision instnace. (what does it do?)
MSCRM update secure configuration
MSCRM backup online instance (Will this really backup the whole CRM online instance?)
Please help me figure out if any of the tasks in your add-on will delete/refresh my whole CRM instance data as i am bit worried about it.
Thanks in advance
Dear Wael,
I wonder if you could point me in the correct direction, I am a little stumped on this one.
Last week friday the 23rd Feb our build was packing the solution correctly, I noticed it was using version 10.0.3 running in a Hosted VS2017 build agent.
Task : MSCRM Pack Solution
Description : Packages a CRM Solution using SolutionPackager.exe
Version : 10.0.3
Author : Wael Hamze
Help : Solution files must be checked-in to source control
Today when we ran the build we noticed that the version is 10.0.4
Task : MSCRM Pack Solution
Description : Packages a CRM Solution using SolutionPackager.exe
Version : 10.0.4
Author : Wael Hamze
Help : Solution files must be checked-in to source control
What we have setup is to use spkl to unpack the solution and check it into git.
Then with the build tasks you have contributed to the community, we install the mscrm tool and then use the mscrm pack solution DevOps task.
I am receiving an error message today with is stating Exit code 5.
Looked this up and it seems to be access is denied error code, to me it seems like the script is trying to import a module which is running inside the build agent and doesn't have permissions to import modules.
Perhaps I have incorrectly setup the script, any direction for me to look would be appreciated.
`
Unmanaged Pack complete.
##[error]Exit code 5 returned from process: file name 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe', arguments '-NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". ([scriptblock]::Create('if (!$PSHOME) { $null = Get-Item -LiteralPath ''variable:PSHOME'' } else { Import-Module -Name ([System.IO.Path]::Combine($PSHOME, ''Modules\Microsoft.PowerShell.Management\Microsoft.PowerShell.Management.psd1'')) ; Import-Module -Name ([System.IO.Path]::Combine($PSHOME, ''Modules\Microsoft.PowerShell.Utility\Microsoft.PowerShell.Utility.psd1'')) }')) 2>&1 | ForEach-Object { Write-Verbose $_.Exception.Message -Verbose } ; Import-Module -Name 'D:\a_tasks\MSCRMPackSolution_ebec2a90-ce1f-11e6-ae21-c1fb031659ee\10.0.4\ps_modules\VstsTaskSdk\VstsTaskSdk.psd1' -ArgumentList @{ NonInteractive = $true } -ErrorAction Stop ; $VerbosePreference = 'SilentlyContinue' ; $DebugPreference = 'SilentlyContinue' ; Invoke-VstsTaskScript -ScriptBlock ([scriptblock]::Create('. ''D:\a_tasks\MSCRMPackSolution_ebec2a90-ce1f-11e6-ae21-c1fb031659ee\10.0.4\MSCRMPackSolution.ps1'''))"'.
##[section]Finishing: MSCRM Pack Solution`
Hi,
When I try to deploy DLL containing workflow code activities between environments using Set-XrmPluginRegistration I get following error:
Multiple plug-in types from the same assembly and with the same typename are not allowed.
Dll can be deployed using CRM solution without issue - there is no duplicate types. Dll already exists in both environments.
Hi @WaelHamze
I've had a look through existing issues but cannot find something that matches what we're looking for assistance/advice with.
Main ask: how can we stop using a username/password combo (in connection string) for creating/deleting environments, and importing solutions and data, and move to token based auth.? Is this something on your radar?
We're using MS Graph API for programmatically consuming/writing to services that are fronted by the MS Graph API (AzureAD, InTune, O365 etc.) - and for now at least - Dynamics 365 CE is not part of the Graph API abstraction capability.
On our Azure DevOps pipelines (apart from Dynamics 365 where we use a Global Admin user account in Connection String format and therefore basic/legacy auth.) we use Token Based auth. to get access to services and associated configurations to carry out CRUD operations as part of Infrastructure and Configuration as code. This works well, and is secure and not vulnerable to basic/legacy auth. attacks.
We need to move away from using a Global Admin account for Dynamics 365 deployments (Azure DevOPs pipelines) as MFA cannot currently be enabled (as the deployment tasks fail for obvious reasons), therefore posing a security risk compared to modern auth (token based auth).
I've taken a look at the documentation, but as per this URL, it seems as though Dynamics 365 is quite a way behind other MS services as far as auth. goes. Is this a fair point?
Is there anything we're missing here, or any workarounds you're aware of?
Thank you
Stephen
FYI - we've used the following as handy guide for getting token auth. working for Graph API.
http://codematters.tech/getting-access-token-for-microsoft-graph-using-oauth-rest-api/
Hi Team,
Facing some issues while extrating the solution IN MSCRM extract Task CICD pipeline in VSTS. and i've aatched the log file also
2019-01-01T06:39:04.4274941Z ##[section]Starting: MSCRM Extract Solution
2019-01-01T06:39:04.4284942Z ==============================================================================
2019-01-01T06:39:04.4294943Z Task : MSCRM Extract Solution
2019-01-01T06:39:04.4294943Z Description : Extracts CRM Solution xml files from CRM Solution zip using SolutionPackager.exe
2019-01-01T06:39:04.4294943Z Version : 10.0.2
2019-01-01T06:39:04.4294943Z Author : Wael Hamze
2019-01-01T06:39:04.4294943Z Help : Solution zip file(s) must be provided
2019-01-01T06:39:04.4294943Z ==============================================================================
2019-01-01T06:39:06.9507464Z SolutionPackger : CRM Solution Packaging Tool [Version 8.2.0.820]
2019-01-01T06:39:06.9777491Z © 2012 Microsoft Corporation. All rights reserved
2019-01-01T06:39:06.9777491Z
2019-01-01T06:39:06.9777491Z The given path's format is not supported.
2019-01-01T06:39:07.2887802Z ##[error]Solution Extract operation failed with exit code: 1
2019-01-01T06:39:07.3147828Z ##[section]Finishing: MSCRM Extract Solution
We are planning to add email functionality to email log file after failure in import. Could you please help us in using this.
if (Test-Path "$artifactsFolder$logFilename")
{
Write-Host "##vso[task.uploadfile]$artifactsFolder$logFilename"
}
Hi - Is there an example of the JSON mapping file for web resources as used by the "MSCRM Update Web resources" step, when you select Deployment Type: "Use JSON mapping for web resource folder"?
Hi,
We're using your 365 tools in azure devops and have noticed that the MSCRM Pack Solution step (v. 10.0.4) is not including the contents of the AppModuleSiteMaps directory in the packaged solution zip files.
The <AppModuleSiteMaps>
tag is empty. When the solution is imported an error "Cannot add a Root Component of type 62 because it is not in the target system" is generated because of this.
Using version 8.2.0.820 of the solutionpackager.exe provided in the SDK seems to resolve the problem (earlier versions may also work this just happens to be the version I have available).
Hey, it would be nice to add an option to the Import/Export Solution tasks, which periodically displays (writes to console) the status of the import/export job until it finished.
Hi,
We are using the PackageDeployer toolset through AzureDevOps to deploy Dynamics 365 solutions, config and data from one Dynamics environment to another (on the same tenant). the deployment is working partially but ends with an error. (please see attached the error logs).
When we run the solution deployment and the config and data manually using the gui tool it works with no errors.
Error: The complex data import is complete.
Import Failed
4_Microsoft.Xrm.Tooling.PackageDeployment-2018-10-26.log
4_MSCRM Portal Package Deployer.log
Thanks
Regards
Verica
It would be nice if there was a task to delete a solution. This would be useful in situations where you are deploying multiple solutions (as holding solutions) and some of the solutions successfully import, but others fail. This would allow you to delete the successfully imported holding solutions to perform a rollback.
This can be accomplished with the DeleteRequest on the solution (link).
I would propose that the task take the solution name as an input parameter, perform a lookup to get the GUID of the solution, and then execute the DeleteRequest.
Used spkl unpack to contact Dyn365 8.2 instance, get everything, bring it locally.
Then used MSCRM Pack Solution in tfs on-prem build, and then Deploy Dynamics 365 Package and Data using Package Deployer to deploy it back out to same Dyn365 8.2 instance.
Get error:
The element 'forms' has invalid child element 'forms'. List of possible elements expected: 'systemform'.'. The validation failed at: '...
with a Entities entity FormXML guid.xml file...
Tried both adding PowerShell to display the value in $env:SOLUTION_IMPORT_LOG_FILE but it's not working. We are using version 11
Write-Host $env:SOLUTION_IMPORT_LOG_FILE
Write-Host $(SOLUTION_IMPORT_LOG_FILE)
2019-01-17T18:47:47.1537177Z ##[error]SOLUTION_IMPORT_LOG_FILE : The term 'SOLUTION_IMPORT_LOG_FILE' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At C:\Users\e2tsbD2\AppData\Local\Temp\1fa38ae8-8bd8-4940-83a8-6a463d20730d.ps1:8 char:14
Could you please help us?
In the Azure DevOps Build Task "MSCRM Export Solution" it is possible to activate the checkbox "Update Version". This takes the Build.BuildNumber
and takes everything after the last _
to update the CRM Solution version.
It would be nice to have the possibility to set the version manually as Task attribute, because it's not always possible to change the Build Number format. In addition when utilizing Azure DevOps Release Definitions it also reads the Build.BuildNumber
variable instead of the Release.ReleaseName
!
Can we embed MSCRMToolInstaller in all tasks? This will reduce the dependency of adding extra task.
I am using Azure Devops to deploy solutions to Dynamics CRM 2016.
Yesterday (12 march) i could use
AuthType=AD;Url=$(Url)
as a connectionstring
Today i get the following message:
Unable to Login to Dynamics CRM
When i use Task 9.* it still works but using 10.* or 11.* i get the unable to login message.
Is there a way we can migrate Configuration data, as we have Dynamics Portals we want to migrate the configuration data from one env to other during CICD build process
Kindly Advise
Hi Wael,
I am trying to use your CRM Build Tools within Azure DevOps but I am having issues with the authentication between the various MSCRM tasks and my Dynamics 365 trial instance. We authenticate to Dynamics online using ADFS on-premise. I have tried using various connect strings in the build tasks but to no avail. The CRM Connection Strings I have tried are:
AuthType=IFD;Username=$(CrmUsername); Password=$(CrmPassword); Url=https://litens0.crm4.dynamics.com
This connect string results in:
Couldn't connect to CRM instance after 3 attempts: Unable to Login to Dynamics CRM
If try using AuthType=OAuth instead of IFD, I get the following error message from MSCRM task:
ClientId or Redirect uri cannot be null or empty.
Parameter name: ClientId and Redirect Name
Should I be using OAuth for this configuration? If so what is the Client ID it is expecting, the VSTS build server? Not sure if you have encountered this kind of configuration before but any suggestions would be greatly appreciated.
Peter Townsend
Hi Wael,
Thank you for this usefull tool. I have a question about the possibility of using the tool On DevOps Online to deploy on CRM OnPrem environnements.
Thanks
Every time we build/Extract the solution we add build/Extract date in the solution properties. Could you please add that feature.
$currentDateTime = Get-Date
#Query CRM for Solution properties
$baseSolution = Get-XrmSolution -ConnectionString $targetCrmConnectionUrl -UniqueSolutionName $solutionName
#Set new Description property for Solutions
Write-Host "Updating Solution properties..."
$baseSolution.EntityState = "Changed"
$baseSolution.Description = "Build " + $baseSolution.Version + " - Build Date: " + $currentDateTime
#Update CRM
Set-XrmEntity -ConnectionString $targetCrmConnectionUrl -EntityObject $baseSolution
Hi Wael,
thanks for your great work!
I have a few questions:
Since when have "dyn365-ce-vsts-tasks" been available?
What does preview means in general related to use it with TFS 2015 Update 3 and D365 for Sales (OnPremise)
Do you recommend to use "xrm-ci-framework" for our environment instead of "dyn365-ce-vsts-tasks"?
When will it be "released" for production?
Will it be free of charge under the MIT license?
Kind regards,
Martin
When trying to import a package with a base/core solution, we are encountering the error below.
"Importing solution threw exception : The size necessary to buffer the XML content exceeded the buffer quota."
The solution is basically a base solution which contains multiple entities, the size is only 500 kb but contains a lot of entity,forms,view,fields
Does anyone know how to update an optionset field using the MSCRM Update Configuration Records?
Hi, I got the following error on solution imports.
Environment details:
CRM instnce: Dynamics 365 Onpremise and TFS.
However the solution is getting imported in the target insatnce. the same error is there on publishing also.
2018-10-31T14:21:01.1515899Z Solution Name: Contact
2018-10-31T14:21:01.1515899Z Solution Version: 1.0.0.0
2018-10-31T14:21:03.0326963Z Solution not currently installed
2018-10-31T14:21:03.3267690Z ##[debug]Current Security Protocol: Ssl3, Tls, Tls11, Tls12
2018-10-31T14:21:03.3297146Z ##[debug]Modified Security Protocol: Ssl3, Tls, Tls11, Tls12
2018-10-31T14:21:03.3337158Z ##[debug]Connecting to CRM [attempt 1]
2018-10-31T14:21:03.3457169Z ##[debug]Importing Solution: C:\agent\_work\a5e0b7bdd\Export and pack\drop\Contact_managed.zip
2018-10-31T14:21:03.3487182Z ##[debug]Setting Default SleepInterval: 15
2018-10-31T14:21:03.3527136Z ##[debug]ImportJobId 4305b354-ab9b-478a-a393-314c7e67bb3c
2018-10-31T14:21:18.7095962Z ##[debug]Sleeping for 15 seconds
2018-10-31T14:21:18.8686051Z ##[debug]StatusCode: 20
2018-10-31T14:21:33.8734631Z ##[debug]Sleeping for 15 seconds
2018-10-31T14:21:33.9094662Z ##[debug]StatusCode: 30
2018-10-31T14:21:33.9134660Z ##[debug]C:\agent\_work\a5e0b7bdd\Export and pack\drop\Contact_managed.zip Imported Completed 4305b354-ab9b-478a-a393-314c7e67bb3c
2018-10-31T14:21:33.9234669Z Solution Import Completed. Import Job Id: 4305b354-ab9b-478a-a393-314c7e67bb3c
2018-10-31T14:21:34.2074799Z ##[error]Method not found: '!!0[] System.Array.Empty()'.
Hi
Is there a beginner's guide that I can refer to? Also I am having issues importing a solution using the MSCRM Import Solution,
"You do not have the necessary permissions to change the domain logon name for this user."
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Access is denied.Detail:
7d3c5cbd-b0ff-46be-bc47-610798da7692
-2147187707
Access is denied.
2018-09-21T19:29:39.572389Z
7d3c5cbd-b0ff-46be-bc47-610798da7692
-2147187707
Access is denied.
2018-09-21T19:29:39.572389Z
7d3c5cbd-b0ff-46be-bc47-610798da7692
-2147220970
System.UnauthorizedAccessException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #9903ACB6
2018-09-21T19:29:39.572389Z
at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)
at Microsoft.Crm.Extensibility.InprocessServiceProxy.ExecuteCore(OrganizationRequest request)
at Microsoft.Crm.Asynchronous.ExecuteSdkMessageOperation.InternalExecute(AsyncEvent asyncEvent)
Thanks!
Could a task be created to create a new (empty) unmanaged solution?
We're creating an aggregate solution for packaging by copying the components from multiple simple solutions into one prior to export. ideally, we would like to create the target solution on the fly.
Is this possible?
Hi @WaelHamze
As we (both myself and @VericaHodder) are new to Dynamics 365 and Azure DevOps, a few things have caught us out - one of which is below, and we'd like to contribute back some of our time to make some things clearer and improve things where we can as this is a great extension, and is very valuable to us and the community. Given we're coming at this fresh, I feel we could add some value here.
I have tried (unsuccessfully) to publish a local branch of this repo with the proposed minor display only changes to aid the user into which drop down box to select. I know of Dynamics only as v8.2 and v9.x, and took a while to try and figure out which one was the right drop down, and what they meant!
Here are my proposed (minor) changes that I'd like to see incorporated if that is possible please to prevent anyone else having the same issue:
File in question to edit:
dyn365-ce-vsts-tasks/BuildTools/Xrm.CI.Framework.BuildTools/Tasks/MSCRMProvisionOnlineInstance/task.json
Line(s):
113 and 114
Detail of request:
Add version numbers (e.g. v8.2; v9) into the displayed options
Azure DevOps GUI displayed options:
Our tenant has these as options with version detail:
Thank you.
Stephen
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.