473,412 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

.NET 2.0 VB Code and C# Code mixed

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

Jan 24 '06 #1
3 1228
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>
<ev**********@canada.com> wrote in message
news:11**********************@f14g2000cwb.googlegr 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

Jan 24 '06 #2
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

<ev**********@canada.com> wrote in message
news:11**********************@f14g2000cwb.googlegr 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

Jan 24 '06 #3
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.

Jan 24 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Perttu Pulkkinen | last post by:
No questions, but just consider if this is useful to you:-) but of course feedback & corrections are welcome. function php_mixed_to_js_value($jsname, $mixed) { if(is_null($mixed)) { return "\n...
2
by: Paul A. Hoadley | last post by:
Hello, I am trying to convert a RELAX NG schema to DTD using Trang. I am currently trying to add some inline elements to the schema, such as <emph> for marking emphasised text. Here is an...
1
by: Mike Kamzyuk | last post by:
Hello all. Basically, I need to call a mixed-mode dll's function (which uses managed code) from a native or mixed-mode dll function (which does not use managed code). I'm wondering if this could...
15
by: Bill Cohagan | last post by:
I'm trying to generate class definitions from an XSD that contains something like: <xs:complexType name="foo" mixed="true"> <xs:choice minOccurs = "0" maxOccurs="unbounded"> <xs:element name =...
6
by: Daniel P. | last post by:
I have some legacy code I would like to wrap by some new managed C++ classes, put them all into a DLL and then call the managed classes from a C# app. Can anyone recommend me a link with some...
8
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR...
1
by: bvisscher | last post by:
I posted this recently in microsoft.public.vc.language and was redirected here. I also searched this ng and found some relavant threads. The most relavent I found was: ...
135
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about...
1
by: andrew_nuss | last post by:
Hi, Lets say I have a MIXED tag in my XML DTD with content that is going to be rendered as HMTL, as well as a <boldand <italicstag. What about whitespace? Specifically, does the whitespace in...
3
by: Pixel.to.life | last post by:
All, A question on JIT debugging with VS2005. I have a managed app that builds great on one machine (Vista Home basic, VS2005, JIT enabled for managed/unmanaged code). I can also debug it...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.