命中或错过dll取决于构建配置 [英] hit or miss dll depends on build configuration

查看:70
本文介绍了命中或错过dll取决于构建配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家,



在一个进一步开发的项目中,我正在使用 WeifenLuo DockPanel套房。 dll很好地驻留在我的硬盘上,并且我的项目设置中包含对它的引用,因此这适用:

Hi experts,

in one ever further developing project, I'm using WeifenLuo DockPanel Suite. The dll conmfortably resides on my harddisk and a reference to it is included in my project settings, so this works:

using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;

namespace EverDevelopingProject.GUI
{
    public class PropertyEditorContent : WeifenLuo.WinFormsUI.Docking.DockContent
    {
        // ...
    }
}

但它只适用于Release版本。切换到调试会导致WeifenLuo出现用蓝色波浪加下划线。当然,当我尝试编译/运行/构建时,我得到错误类型或名称空间WeifenLuo找不到。(你是否错过了使用指令或程序集引用?)(从德语翻译)。 />


Debug构建设置可能出现什么问题?



感谢阅读,





lukeer

But it does only work in Release build. Switching to Debug causes the "WeifenLuo" occurances to get underlined with blue waves. And of course when trying to compile/run/build, I get the error "Type or namespace "WeifenLuo" not found. (Are you missing a using directive or assembly reference?)" (on the fly translated from German).

What could possibly have gone wrong with the Debug build setting?

Thanks for reading,


lukeer

推荐答案

已解决。



当然:

将dll设置为通过Local Copy = true(在dll设置中)复制到bin \Release目录。

调试模式设置为在Release之前构建。



假设:

在build new时,目录为空,因此Debug无法找不到dll。发现它是因为dll被复制到Release目录。
Solved.

Sure:
The dll was set to be copied to bin\Release directory via "Local Copy = true" (in dll settings).
Debug mode was set to be built prior to Release.

Hypothesis:
Upon "build new", the directory was empty so Debug couldn't find the dll. Release found it because dll was copied to Release directory.


这篇关于命中或错过dll取决于构建配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆