I learned something cool today. I’m taking over a site that’s been written in VB.NET. While making some major modifications, I had to create a few new util classes. The problem is, the existing classes in the App_Code folder was written in VB.NET and I like to code in C#. If you try to compile a site that has two different languages in the App_Code directory, it won’t work. I found this article that says it can be done it just two steps. The trick is to create two subdirectories in App_Code; one to house each language; then edit your web.config to let the compiler know what to expect.
In an ideal environment this works. The website will compile fine. But I ran into another issue after doing this. After I created my two subdirectories (CS_Code and VB_Code), I moved the existing VB classes into VB_Code. The problem is, there are xsd files that I need to leave in the App_Code folder. These DAL files need to be in the root App_Code directory because it needs to be accessed by all the classes (VB and C#). But after I moved the VB classes into VB_Code, the VB classes can no longer see the xsd classes.
I feel like this is an issue that can easily be resolved but it’s past midnight and maybe my mind isn’t thinking straight. Also keep in mind that the project is a Website and not a Web Application. I’ve ran into issues in the past where the nuances between the two made a world of difference. It’s shame this project is due tomorrow. Comment/suggestions welcome*.
*and encouraged