Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

EntityFramework.Core.Tools nuget package installation error: "The process cannot access the file ef.exe because it is being used by another process"

$
0
0

While installing the package Microsoft.EntityFrameworkCore.Tools for using EF in my project using Nuget, I'm persistently running into the below error. Notice I didn't get any error while installing other related packages used for EF core

  • Microsoft.EntityFrameworkCore
  • Microsoft.EntityFrameworkCore.Relational
  • Microsoft.EntityFrameworkCore.SqlServer

Microsoft.EntityFrameworkCore.Tools.Error

Here is the location of the file ef.exe

EF.Core.exe

Basically the intention behind installing this package is to use EF command-line tools. I'm currently on Windows 10 and the .NET SDK installed on my machine is 3.1. I had previously 2 SDK's installed on my system(3.1 & 5.0). As per microsoft's documentaion, "The .NET CLI must choose an SDK version for every dotnet command. It uses the latest SDK installed on the machine by default." Therefore I went ahead and uninstalled .NET 5.0 SDK

Dot.Net.Core.SDK.version

Here are some of the solutions that I tried:

  1. Deleting the package folder from '.nuget/packages/microsoft.entityframeworkcore.tools'& thereby the executable i.e. 'ef.exe' and reinstalling the same.
  2. Installing the same package using dotnet cli.
  3. Running Visual Studio 2019 as admin.
  4. Deleted the folder "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions"

I have also tried some of the steps mentioned here on github: https://github.com/NuGet/Home/issues/1138. Any kind of help would be really appreciated.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>