I posted a similar post about this issue in 2011. You can see it here. This is just a follow-up and an update to that blog post with a new possible way to solve this problem.
This problem can occur when you are building a BizTalk Server project inside Visual Studio that contains a custom pipeline that uses a custom pipeline component. Giving you the following error:
Unable to copy file “…\Pipeline Components\MyPipelineComponent.dll” to “bin\Debug\ MyPipelineComponent.dll”. The process cannot access the file “bin\Debug\ MyPipelineComponent.dll” because it is being used by another process
Cause
The cause of that error is pretty much self-described. Someone has a lock of that file, like
- Visual Studio has a lock on the file to show the toolbox’s pipeline components.
- Some BizTalk processes are running, and the BizTalk Server host has a lock on the file.
- Or simply because there are suspended messages in the BizTalk Server Administration Console that are using that component.
Just to clarify, the previous solutions I described in the last blog post are still valid ways to solve this issue, but there is also a different way.
Solution
- Access the project containing the custom pipelines that use that component in the Visual Studio BizTalk Server solution.
- Expand the Reference and rick-click on the custom pipeline component DLL and select Properties.
- On the Properties panel, set the Copy Local property to False.
Now, if you try to deploy it, everything will work. At least those errors will disappear.
I hope you find this helpful! If you liked the content or found it useful and want to help me write more, you can buy (or help me buy) my son a Star Wars Lego!