Entity Framework tools - Azure DevOps Warning

Yiannhs Rakitzopoulos 1 Reputation point
2022-08-29T06:23:58.71+00:00

I have an Azure Devops (on-premises) issue.

I am getting the following warning the 'Migrations script' pipeline step:

   'The Entity Framework tools version '6.0.5' is older than that of the runtime '6.0.6'. Update the tools for the latest features and bug fixes. See https://aka.ms/AAc1fbw for more information'  

I noticed that the commands runs from the following path:

   C:\Windows\system32\config\systemprofile\.dotnet\tools\.store\dotnet-ef\6.0.5\dotnet-ef\6.0.5\tools\netcoreapp3.1\any\tools\netcoreapp2.0\any\ef.dll  

(notice the .store in the path)

The associated steps from my pipeline.yaml are the following:

//Ommit previous steps  
- task: DotNetCoreCLI@2  
      displayName: 'Restore from dotnet Tools'  
      inputs:  
        command: 'custom'  
        custom: 'tool'  
        arguments: 'restore --tool-manifest $(dotnetToolsPath)'  
 - task: DotNetCoreCLI@2  
      displayName: 'Migrations script'  
      inputs:  
        command: 'custom'  
        custom: 'ef'  
        arguments: 'migrations script --idempotent --output $(Path) -p $(databaseProjectPath)\MyDbProj.csproj -s $(apiProjectPath)\MyApiProj.csproj --verbose --context DbContext'  
//Ommit next steps  

The 'Restore from dotnet Tools' step returns the following:

Tool 'dotnet-ef' (version '6.0.6') was restored. Available commands: dotnet-ef

I even tried adding an 'Update dotnet tools' before the aforementioned steps with the following arguments:

   update dotnet-ef --tool-manifest $(dotnetToolsPath) --version 6.0.6  

but I still got the same warning.

The
dotnet-tools.json
contains:

   {  
     "version": 1,  
     "isRoot": true,  
     "tools": {  
       "dotnet-ef": {  
         "version": "6.0.6",  
         "commands": [  
           "dotnet-ef"  
         ]  
       }  
     }  
   }  
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
697 questions
{count} votes