如何使用外部项目的名称空间? [英] how to use namespace of external project?

查看:67
本文介绍了如何使用外部项目的名称空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前:

我的程序中有以下使用中".

I have the following Using in my program.

using Mtx;

这使我可以使用Mtx.*属性.它指的是外部"文件夹中的文件.

which allows me to use Mtx.* properties. It refers to a file in "Externals" folder.

路径为: Externals/Mtx.dll

需要:

但是,出于调试目的,我现在想在外部使用整个mtx解决方案并使用它.

However, for debugging purposes, I'd like to now have the whole mtx solution in external and use it.

路径为: Externals/Mtx/(solution in there with all folders)

我该怎么做,所以现在它不是使用Mtx.dll而是使用解决方案并构建其自身的一部分?

How can I do so, so instead of Using refers to the Mtx.dll, it now refers to the solution and build it has part of its own?

推荐答案

我认为您误解了一些概念并将这些东西混在一起.让我用您自己的解释来解释:

I think that you are misunderstanding some concepts and mixing things. Let me explain with your own explanation:

我的程序中有以下使用中".

I have the following Using in my program.

使用Mtx;这使我可以使用Mtx.*属性.它指的是 文件在外部"文件夹中.

using Mtx; which allows me to use Mtx.* properties. It refers to a file in "Externals" folder.

路径为:Externals/Mtx.dll

Path is : Externals/Mtx.dll

using关键字允许您使用命名空间中的类,而不必每次都键入整个命名空间.它与dll类无关,您可以在类内部使用所有公共dll,而仅使用整个命名空间+类名,只需将其添加为项目引用即可.

The using keyword allows you to use the classes inside a namespace without typing the whole namespace everytime. It has nothing to do with dll classes, you can use all the public dlls insidea class just using the whole namespace + the class name only adding it as a project reference.

需要:

但是,出于调试目的,我现在想拥有整个mtx 外部解决方案并使用它

However, for debugging purposes, I'd like to now have the whole mtx solution in external and use it

出于调试目的,您需要的只是使用的dll的pdb,并且您可以调试任何类,只要您具有其源代码即可,而无需更改其他任何东西.

For debugging purposes all you need are the pdb's of the dlls used and you will be able to debug any class considering you have its source code without changing anything else.

这篇关于如何使用外部项目的名称空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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