title: Azure Pipelines DotNetCoreCLI - .Net Core SDK End of Life
body: <p>I am receiving an error in Azure CI pipelines. While trying to run a DotNetCoreCLI <code>restore</code> task.</p>
  <p>Been scrapping the net for hours to no avail, no solution from related questions have helped me understand the problem.</p>
  <p>Basically, we have added a new project to a repo. This project requires a dotnet restore command to be run to create the <code>project.assets.json</code> file.</p>
  <p>Please see script below and log snapshot for each task.</p>
  <p><strong>Script:</strong></p>
  <p><a href="https://i.stack.imgur.com/7fRqZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7fRqZ.png" alt="enter image description here" /></a></p>
  <p><strong>UseDotNet snapshot:</strong></p>
  <p><a href="https://i.stack.imgur.com/j5GIp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j5GIp.png" alt="enter image description here" /></a></p>
  <p><strong>DotNetCoreCLI error message:</strong></p>
  <p>Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you're using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version.</p>
  <p>##[error]No files matched the search pattern.</p>
  <p>Info: Azure Pipelines hosted agents have been updated and now contain .Net 5.x SDK/Runtime along with the older .Net Core version which are currently lts.</p>
  <p>Have looked around quite a bit. Nothing seems to help me understand what is going wrong here.</p>
  <p>Any assistance would be appreciated.</p>