Migrator.EF6 icon indicating copy to clipboard operation
Migrator.EF6 copied to clipboard

rror MSB3027: Could not copy "obj\Debug\net47\*.EntityFramework.dll"

Open muehan opened this issue 5 years ago • 5 comments

I have the problem that I can only run 1 command, after that I have the error:

The process cannot access the file 'MyAssembly.EntityFramework\bin\Debug\net47\MyAssembly.EntityFramework.dll' because it is being used by another process.

  • I have a fresh started Windwos 10
  • open PS and navigate to the project path
  • run dotnet ef6 database update or migrations add blabla
  • when this runs into an error no more commands are running

Since its pretty anoying to restart the computer after each command and I have no idea what it could be. I checked the background processes and the process Explorer, nothing else is running.

muehan avatar May 16 '19 13:05 muehan

That's a strange error, never faced it before and I use Migrator.EF6 extensively at work. I'm trying to make something out but I have no idea what could be causing it really. Maybe start with checking to see if after that first command there's a hanging "dotnet-ef6.exe" running in Task Manager?

mrahhal avatar May 16 '19 16:05 mrahhal

There is no dotnet-ef6.ese running. I closed all programs and killed many processes but no luck. And I only have this problem on that one Win10 VM. My Colleagues don't have that problem and they have the same setup. I really tried everything I can imagine could be a problem before opening this issue here. But I understand that if I'm the only one having that problem on only one machine it is nearly impossible to find the root if this behavior. I thought maybe someone else has the same problem and maybe has an idea why it happens.

muehan avatar May 23 '19 07:05 muehan

I see. Yeah really sorry, I have no idea where to begin. But if you find any hint let me know and I'll do my best to help.

But one more thing, does this happen no matter which project you run this in? What I mean, did you try perhaps running this in the sample in this repo? Does the same thing happen?

mrahhal avatar May 23 '19 07:05 mrahhal

Sorry for the late reply, lots of work... I have tested in different repos, but not with this one. I try to do that soon.

muehan avatar Jun 06 '19 11:06 muehan

oke, I have the problem again. new migrations :) I see that the process "dotnet-ef6.exe" is in the Process Explorer. It hat the state "Suspended" but stays there forever. I can not kill it it says "Access is denied".

muehan avatar Jun 26 '19 06:06 muehan