Question

I have cs and vb folders under app_code in my web site (4.0) which contain classes in their respective languages. Both sets of classes compile. My code behind (aspx.cs and aspx.vb) files have no trouble in referencing either. This works well, and has for years.

However... I recently attempted to add a method to a class in the app_code/vb folder that references a class in the app_code/cs folder. It did not work. The vb classes appear to be completely blind to the c# classes and vice versa.

Is there a way to allow a class method in app_code/vb to reference a class in app_code/cs?

Was it helpful?

Solution

I don't think you can do that. But you can move your code to separate projects and reference the project. The net effect will be similar (both get compiled to a binary), but now your projects can also reference each other.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top