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

MSCRM Tool Installer #63

Closed crmdruid closed 5 years ago

crmdruid commented 5 years ago

Good day Wael,

I hope you are doing well that side. I am experiencing an unusual issue this week. I have tried on another Azure Dev Ops Instance which isn't in part of the organisations to be sure.

In the private one, I setup an release pipeline with the MSCRM Tool Installer extension.

In the organisation one, the release pipeline has an vstest tasks for smoke tests which is why the errors are slightly different.

Private Azure Dev Ops No agent found in pool Hosted VS2017 which satisfies the specified demands: powershell Agent.Version -gtVersion 1.95.0

Organisation Azure Dev Ops No agent found in pool Hosted VS2017 which satisfies the specified demands: powershell vstest Agent.Version -gtVersion 2.115.0

When I disable the MSCRM Tool Installer, then the agent starts up OK but obviously the other MSCRM tools won't run.

Have you experienced this issue before?

reimondot commented 5 years ago

Our release pipelines have also suddenly broke this week with the same error:

No agent found in pool Hosted VS2017 which satisfies the specified demands: powershell Agent.Version -gtVersion 1.95.0

To be sure, I've also just tested it out in a separate dev ops instance by creating a release definition with just 1 task and can confirm the MSCRM Tool Installer extension returns the same error: No agent found in pool Hosted VS2017 which satisfies the specified demands: powershell Agent.Version -gtVersion 1.95.0

Since the D365 build tools hasn't changed in the past few days I'm guessing a recent update to Azure Dev Ops has broken it?

reimondot commented 5 years ago

@crmdruid While waiting for this issue to be resolved, I've found a temporary workaround which is to use the v9 of the import/publish tasks instead of the newer v10/v11 ones as the older v9 doesn't require the MSCRM Tools task.

crmdruid commented 5 years ago

@reimondot thanks for the feedback, currently I'm using the package deployer, a few people have recommended using an older version of the task, how do I do this?

Whether I use the import task or any of the others, I am only able to select the latest version.

image

image

reimondot commented 5 years ago

@crmdruid On mine I just click on the Task version dropdown and I get the other versions:

image

I've just tested it out on a different Azure Dev Ops instance and I think I know why yours is different. On my Azure Dev Ops instance, I had installed the D365 Build Tools quite a while ago back when version 9 was the latest version.

When I go to a brand new Azure Dev Ops instance and install the D365 Build Tools from scratch, I only get v11 which is the same as you. So unfortunately I don't think you will be able to use the same temporary workaround because you hadn't installed the previous versions.

Unfortunately I think in your case you'll need @WaelHamze to advise.

WaelHamze commented 5 years ago

@crmdruid @reimondot I have just tested this on Hosted Agent 2017 and it seems to be still working fine for me.

It looks like the agent is not picking up the fact that you have powershell installed on the build server.

You could try to manually add the capability and see if it helps to work around the issue: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops#capabilities

You can also raise an Azure DevOps issue if this is happening on the hosted agents

plumski commented 5 years ago

This is what I am getting:

[Error 1]

No agent found in pool Hosted which satisfies the specified demands: powershell Agent.Version -gtVersion 1.95.0

Does anyway have solution?

plumski commented 5 years ago

I just added:

USER CAPABILITIES powershell 6.1.3 and it works

WaelHamze commented 5 years ago

@plumski glad it works, I guess there is nothing wrong in the task as it requires powershell so better add this dependency.

gabrieljunckes commented 5 years ago

I had the issue and it was resolved when I added the USER CAPABILITIES in the Agent Pool

image