This project has moved and is read-only. For the latest updates, please go here.

MSB3027 Error with Sandcastle project

Topics: Developer Forum, User Forum
Mar 24, 2014 at 8:20 PM
Hi, I have added my sandcastle project into the solution that also builds the dll that i am generating documentation for. When I build the first time it all works perfectly but every subsequent build of my dll throws an error MSB3027 (Cannot copy obj\Debug*.dll to bin\Debug*.dll). All I can do is close studio and restart. Also if I have the shfb project open in the standalone GUI version and not added in as a project in studio I get the same results with my dll after building in the standalone one time. Any ideas how to avoid this? I would like to compile it as a project in studio when i change my dll.
Mar 24, 2014 at 9:43 PM
Place your documentation project in a subfolder under the solution folder separate from the main project. If at the solution root or in the same folder as your main project it's searching for components and is loading the built assembly in an attempt to look for components. Unfortunately, the MEF stuff doesn't unload assemblies it doesn't need so it's blocked from being replaced on the next build. Putting your SHFB project in a separate subfolder will prevent that.