0

Could not load file or assembly 'Microsoft.Owin.Security.OAuth' or one of its dependencies. The process can not access the file because the file is in use by another process. (Exception from HRESULT: 0x80070020)

I can't understand the reason of error

2

3 Answers 3

1

Reason for that error is: the said assembly Microsoft.Owin.Security.OAuth is locked by some other process. Means, at current some other process already using it and your application is trying to load the same.

Most probably you application is already running and you are trying to build your solution. solution: End your application and then close and re-open your solution again.

2
  • When i close the project and open again this error sometimes removed and project is running successfully, but not at all time.Is this a error connected with database, or connectionstring? Jun 26, 2016 at 10:17
  • @ZhanVardanyan, NO, as said in answer, some other process is already using the dll and so your application not able to load it. Another solution would be: close and re-open visual studio altogether.
    – Rahul
    Jun 26, 2016 at 10:19
0

This error is telling you that the whole assembly couldn't be loaded in current AppDomain because it's already locked by another process.

You'll need to check if you're using in any other project and it's already taken...

0

As mentioned, this assembly 'Microsoft.Owin.Security.OAuth' is attached by some other process.Its probably because your solution is already attached with other process. Go to task manager close the operation manually and then try to build it again.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.