microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀
MIT License
1.7k stars 855 forks source link

Repeated issue #4831

Open ahmed-assad opened 3 weeks ago

ahmed-assad commented 3 weeks ago

Describe your question

pipeline didn't run anyway - although a simple hello world pipeline running naturally

[error]No agent found in pool dod which satisfies the following demand: visualstudio. All demands: visualstudio, msbuild, Agent.Version -gtVersion 2.217.2

Versions

azure devops agent 2.217.2 / windows server 2019 standard

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

Azure DevOps Server (Please specify exact version in the textbox below)

Operation system

windows server 2019

Version controll system

git

Azure DevOps Server Version (if applicable)

azure devops server 2022

vmapetr commented 2 weeks ago

Hi @ahmed-assad, thank you for the question! According to the error message your self-hosted agent doesn't have the Visual studio and MSbuild in System capabilities. Could you please confirm that you have Visual Studio installed on your self-hosted agent and Visual studio capability configured on your agent? Please check this documentation to see how to configure the agent capabilities - https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=yaml%2Cbrowser#configure-agent-capabilities

Also please check the following documentation for additional information about the demands and capabilities for more information.

ahmed-assad commented 1 week ago

Yes, i have configured the "Visual Studio installed on your self-hosted agent and Visual studio capability" and still have the same error

vmapetr commented 1 week ago

Hi @ahmed-assad Could you please provide following information so we can proceed with the investigation:

ahmed-assad commented 1 week ago

1 2 3 5

Error after enabling diagnose run :
" ##[error]The nuget command failed with exit code(1) and error(C:\Users\AAssad\agent_work\2\s\Domain\Domain.csproj : error : Could not resolve SDK "Microsoft.NET.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK. "