![]() |
|
|
|||||||
![]() |
ASP Net - .NET 2.0 VB Code and C# Code mixed |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Hi,
I was under the impression it was possible to have two files written in different langage with the .NET 2.0 Framework? I have created a new web site, added one APP_CODE folder and under the APP_CODE folder I created two new item, one C# class and one VB class to test out if it was working. However I get the following error when I try to compile (Did I do something wrong or is it not allowed?) /: Build (web): The file 'Test/APP_CODE/test.vb' and 'Test/APP_CODE/test2.cs' use a different language, which is not allowed since they need to be compiled together. Let me know what I did wrong, THANKS!! Evian evian_spring@canada.com |
|
|
|
|
#2 |
|
Posts: n/a
|
You could have multiple library in different languages interacting
seamlessly but a single module (a library is generally made of one module) should be in one language. The WebServer automatically compile all the files in App_Code as one library (& module), therefore they should all be in the same language! -- Regards, Lloyd Dupont NovaMind development team NovaMind Software Mind Mapping Software <www.nova-mind.com> <> wrote in message news: oups.com... > Hi, > > I was under the impression it was possible to have two files written in > different langage with the .NET 2.0 Framework? > > I have created a new web site, added one APP_CODE folder and under the > APP_CODE folder I created two new item, one C# class and one VB class > to test out if it was working. > > However I get the following error when I try to compile (Did I do > something wrong or is it not allowed?) > > /: Build (web): The file 'Test/APP_CODE/test.vb' and > 'Test/APP_CODE/test2.cs' use a different language, which is not > allowed since they need to be compiled together. > > > Let me know what I did wrong, THANKS!! > Evian > |
|
|
|
#3 |
|
Posts: n/a
|
Hi,
By default, the App_Code directory can only contain files of the same language. However, you may partition the App_Code directory into subdirectories (each containing files of the same language) in order to contain multiple languages under the App_Code directory. To do this, you need to register each subdirectory in the Web.config file for the application. <configuration> <system.web> <compilation> <codeSubDirectories> <add directoryName="Subdirectory"/> </codeSubDirectories> </compilation> </system.web> </configuration> Straight from the quick start!!!!Cheers, Adam <> wrote in message news: oups.com... > Hi, > > I was under the impression it was possible to have two files written in > different langage with the .NET 2.0 Framework? > > I have created a new web site, added one APP_CODE folder and under the > APP_CODE folder I created two new item, one C# class and one VB class > to test out if it was working. > > However I get the following error when I try to compile (Did I do > something wrong or is it not allowed?) > > /: Build (web): The file 'Test/APP_CODE/test.vb' and > 'Test/APP_CODE/test2.cs' use a different language, which is not > allowed since they need to be compiled together. > > > Let me know what I did wrong, THANKS!! > Evian > |
|
|
|
#4 |
|
Posts: n/a
|
Thank you soooooo much!!!!! The files within a sub directory must be
of same lang but other sub directory can be of other langage. This is great......I tried it and it works like a charm. |
|