473,765 Members | 1,994 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.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 1237
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**********@c anada.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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.
<configuratio n>
<system.web>
<compilation>
<codeSubDirecto ries>
<add directoryName=" Subdirectory"/>
</codeSubDirector ies>
</compilation>
</system.web>
</configuration>
Straight from the quick start!!!!Cheers ,
Adam

<ev**********@c anada.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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
2573
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 $jsname = null;\n"; } elseif(is_string($mixed)) { return "\n $jsname = '$mixed';\n"; } elseif(is_numeric($mixed) || is_boolean($mixed))
2
1766
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 excerpt from the schema: <define name="description"> <element name="description"> <mixed>
1
2200
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 be accomplished and how. Here's the problem. We have a third party app (TPA) capable of loading native and mixed-mode dlls somehow (we don't know how). It loads our native dll (OND) and allows us to use our code inside the app (that is, we...
15
5418
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 = "bar" type = "something"/> ... <xs:element name = "baz" type = "somethingelse"/> </xs:choice> </xs:complexType>
6
4296
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 info about this? Also, can I statically link my DLL to my C# application or I have to ship the Managed C++ DLL with the C# exe appllication? Thanks!
8
2321
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 types. The problem: I have a number of mixed-mode functions which I want reuse. These functions revolve around converting a CLR String to a C++ std::string or
1
2229
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: http://groups.google.com/group/microsoft.public.dotnet.languages.vc/browse_frm/thread/dac4c07f8678cc0a/32919fdc1ee07313?q=static+initialization+mixed&rnum=2#32919fdc1ee07313
135
7517
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 which is better. It has become what's known as “religious war” — a heated fight over trivia. In this essay, i like to explain what is the situation behind it, and which is proper.
1
1584
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 PCDATA of the MIXED tag get rendered into the output html? Or is it a setting in the XSL transforming document? Thanks, Andy
3
2426
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 on this machine with breakpoints and all.
0
9566
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9393
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10153
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7371
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6646
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5272
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3921
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2800
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.