[英]Project build into a different output directory, how to debug from it?
I have a web application solution VS2010 where I output to 我有一个Web应用程序解决方案VS2010,我将其输出到
..\..\Project.Namespace.Bin\
When I want to debug, I get an exception because I don't have a given assembly in $(ProjectDir)\\bin\\
. 当我想调试时,出现异常,因为在
$(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. 目前,我的解决方案是使用构建后事件将内容复制到
bin\\
dir,或手动复制我自己不编译而只是参考的程序集。 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. 这个问题并非无处不在,但通常是在必须从诸如
web.config
文件中读取某些内容然后进行动态加载时出现。
Try to set CopyLocal to true on your references. 尝试在您的引用上将CopyLocal设置为true。 This way all referenced dlls will be copied into your build output dir.
这样,所有引用的dll将被复制到您的生成输出目录中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.