调试依赖类库 [英] Debugging Dependent class library

查看:60
本文介绍了调试依赖类库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有三个不同解决方案的c#应用程序,一个Windows窗体应用程序和两个类库。 Windows窗体是启动解决方案,使用来自两个类库的dll。现在我在其中一个类库中添加了一个断点,这样我就可以看到类库的方法发生了什么,然后运行windows表单但程序永远不会在断点处停止。它也处于调试配置中。

问题是什么?



顺便说一句,当我尝试运行这个类库时,我收到了这个错误:



Visual Studio无法启动调试因为调试目标F:\Dropbox \ Leerjaar \ RT-meter \07-software \modediagnose \ bin \Debug \Dat。 core.exe缺失。请构建项目并重试,或者相应地设置outputPath和AssemblyName属性以指向目标程序集的正确位置。

I have a c# application of three different solutions, one windows form application and two class libraries. The Windows form is the startup solution and uses dll from the two class libraries. Now I added a breakpoint to one of these class libraries so I can see what's going on in the class library's method, and run the windows form but the program never stops at the breakpoint.It is in debug configuration as well.
What can the problem be?

By the way when I try to run this class library I get this error:

"Visual studio cannot start debugging because the debug target "F:\Dropbox\Leerjaar\RT-meter\07-software\modediagnose\bin\Debug\Dat.core.exe" is missing. Please build the project and retry, or set the outputPath and AssemblyName properties appropriately to point at the correct location for the target assembly."

推荐答案

在同一解决方案中添加所有项目,将表单应用程序指定为启动项目,从表单项目中删除对其他项目的任何dll引用,而不是使用项目引用引用项目。这将让您进入其他项目并进行调试。
Add all projects in the same solution, specify the form app as the startup project, remove any dll references to the other projects from the forms project, reference the projects using a project reference instead. That will let you step into other projects and debug them.


这篇关于调试依赖类库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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