简体   繁体   English

如何使vb.net看到vb 2005类程序集

[英]How to make a vb.net see a vb 2005 class assembly

I am a java developer that inherited a vb.net web application. 我是继承了vb.net Web应用程序的Java开发人员。 This app relies on a VB class assembly that builds in to a dll. 此应用程序依赖于内置到dll中的VB类程序集。 I have made some changes to this class assembly but I cant seem to get the vb.net app to pick up the changes. 我对该类程序集进行了一些更改,但似乎无法获得vb.net应用程序来进行更改。 I thought that using regsvr32.exe or regasm.exe would do the trick but after reading a bit more they don't appear to do what I need. 我以为使用regsvr32.exe或regasm.exe可以解决问题,但是在阅读了更多内容之后,它们似乎并没有满足我的需要。

When vb.net uses code such as this import where is it getting the reference to "MyClassName"? 当vb.net使用此导入之类的代码时,它将在何处获得对“ MyClassName”的引用?

<% Import namespace="MyClassName" %>

The reference is not done with Import. 导入未完成引用。 References are set in the virtual project properties. 在虚拟项目属性中设置引用。 You should see the destination of your reference there. 您应该在那里看到参考的目的地。

You need two parts: 您需要两个部分:

  1. A reference in project properties 项目属性中的参考
  2. An Import of the namespace of your loaded assembly. 导入已加载程序集的名称空间。

A reference could be a reference to an existing project or a reference to an existing dll. 引用可以是对现有项目的引用,也可以是对现有dll的引用。

How to: Add or Remove References in Visual Studio: 如何:在Visual Studio中添加或删除引用:

http://msdn.microsoft.com/en-us/library/wkze6zky.aspx http://msdn.microsoft.com/en-us/library/wkze6zky.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM