如何添加.vb文件以供参考 [英] How to add .vb file to reference

查看:97
本文介绍了如何添加.vb文件以供参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

我有一个testing1.vb文件,需要添加到其他项目的引用中.据我所知,只有testing1.dll文件只能添加到参考中.我只有testing1.vb文件.没有 ( ) ->> bin-> Debug/Release-> testing1.dll.

I have a testing1.vb file that need to add to the reference to the other project. As far as i know only testing1.dll file only can be add to reference. Im only have testing1.vb file. There is no dll file in (Library Project) ->bin->Debug/Release->testing1.dll in the folder.

我必须将.vb文件转换为dll文件吗?如果可以的话,该怎么做?

Do i have to convert .vb file to dll file? And if so how to do it?

非常感谢您的帮助.

 

推荐答案

我必须将.vb文件转换为dll文件吗?如果可以的话,该怎么做?

Do i have to convert .vb file to dll file? And if so how to do it?

如果要将其添加为引用,则它将需要是DLL.如果您使用模板类库创建新项目,则可以将vb文件添加到该项目并构建DLL.然后,您可以从您的项目中引用DLL.

If you want to add it as a reference then it will need to be a DLL.  If you create a new project using the template Class Library, you can add the vb file to that project and build the DLL.  Then you can reference the DLL from your project.

如果不必作为参考,则只需将vb文件作为项目文件之一添加到您的项目中.如果是表格,则可以使用该表格.如果是模块,则在两种情况下都可以使用模块中的方法 就像您已经创建文件并输入代码一样.

If it doesn't have to be a reference you can simply add the vb file to your project as one of the project files.  If it's a form then that form will then be available to use; if it's a module then you can use the methods in the module, in both cases as if you had created the file and typed in the code.

第二种方法可能更简单.如果打算在许多项目中使用DLL,则只会费心创建它.

The second method is probably simpler.  You would only bother to create the DLL if you intended to use it in a number of projects.


这篇关于如何添加.vb文件以供参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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