I need to deploy a wsp file in VS, but I am not able to do that because I am getting the error in my question's title, I tried doing IIS reset, restarting my development machine.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
The reason this error occurs is because the assembly is being used, just like the message says. To resolve the error, you just need to figure out what is using the assembly, and stop it from doing so.
The real question here is "Where is the assembly being used?"
If the project doesn't build in VS (click Build only, not Deploy), you know the issue is on your dev box. One fix in this instance is to go to
Tools > Options > Projects and Solutions > Build and Run. Then reduce the "maximum number of parallel project builds" to 1. This will make your build slower, but can fix this issue in some instances.
If the project builds on dev, but throws the error on deploy to a remote farm, your solution is in use when you try to deploy "over it". You need to retract the solution and redeploy the new build.