Project build into a different output directory, how to debug from it?
I have a web application solution VS2010 where I outpu开发者_如何学Pythont to
..\..\Project.Namespace.Bin\
When I want to debug, I get an exception because I don't have a given assembly in $(ProjectDir)\bin\
.
Currently my solution is to use post build events to copy stuff to the bin\
dir, or to manually copy assemblies I don't compile myself, but rather just reference. I was wondering if there was a happier approach to this. Namely, if I could just set the other directory as the "default directory to try and find reference assemblies in".
This issue isn't everywhere but it usually arises when something has to be read from, for instance, the web.config
file, and then loaded dynamically.
Try to set CopyLocal to true on your references. This way all referenced dlls will be copied into your build output dir.
精彩评论