473,395 Members | 1,440 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,395 software developers and data experts.

dll with both C# and VB

I have a VS 2008 project that is going to create a Class Library.

Can I use both C# and VB files to create this?

I have 3 classes that are in C# and 4 that are in VB and would like to put
them in the same library.

If not, I will create 2. But if I create 2 .dlls can they use the same
namespace?

Thanks,

Tom
Sep 14 '08 #1
8 1476
You can't create a single dll that is coded in different languages.
Either create two dll's or convert the source code to a single language.
--
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
VB & C# to Java
Java to VB & C#
Instant C#: VB to C#
Instant VB: C# to VB
Instant C++: VB, C#, or Java to C++/CLI
"tshad" wrote:
I have a VS 2008 project that is going to create a Class Library.

Can I use both C# and VB files to create this?

I have 3 classes that are in C# and 4 that are in VB and would like to put
them in the same library.

If not, I will create 2. But if I create 2 .dlls can they use the same
namespace?

Thanks,

Tom
Sep 14 '08 #2
David Anton wrote:
You can't create a single dll that is coded in different languages.
Either create two dll's or convert the source code to a single
language.
Now I am confused.

What about what Juan said about the App_Code folders and using it to created
one dll with different languages?

Thanks,

Tom
>I have a VS 2008 project that is going to create a Class Library.

Can I use both C# and VB files to create this?

I have 3 classes that are in C# and 4 that are in VB and would like
to put them in the same library.

If not, I will create 2. But if I create 2 .dlls can they use the
same namespace?

Thanks,

Tom

Sep 14 '08 #3
"tshad" <tf*@dslextreme.comwrote in message
news:eD**************@TK2MSFTNGP04.phx.gbl...
David Anton wrote:
>You can't create a single dll that is coded in different languages.
Either create two dll's or convert the source code to a single
language.
Now I am confused.

What about what Juan said about the App_Code folders and using it to
created one dll with different languages?
Juan is correct:
http://pietschsoft.com/post/2006/03/...de-folder.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 14 '08 #4
"David Anton" <Da********@discussions.microsoft.comwrote in message
news:D5**********************************@microsof t.com...
You can't create a single dll that is coded in different languages.
http://pietschsoft.com/post/2006/03/...de-folder.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 14 '08 #5
That isn't a dll though...
--
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
VB & C# to Java
Java to VB & C#
Instant C#: VB to C#
Instant VB: C# to VB
Instant C++: VB, C#, or Java to C++/CLI
"Mark Rae [MVP]" wrote:
"tshad" <tf*@dslextreme.comwrote in message
news:eD**************@TK2MSFTNGP04.phx.gbl...
David Anton wrote:
You can't create a single dll that is coded in different languages.
Either create two dll's or convert the source code to a single
language.
Now I am confused.

What about what Juan said about the App_Code folders and using it to
created one dll with different languages?

Juan is correct:
http://pietschsoft.com/post/2006/03/...de-folder.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 14 '08 #6
yes you can, but visual studio does not have builtin support for two
languages in one project, so you will need to edit the project file to
do it. you need to compile the source with the correct compiler, then
use al.exe to build the assembly. you could also to two projects and
combine as a separate step.

unless you need one dll, the simple answer is to create two projects
using the same namespace (or just convert the vb code c#, probably less
work than editing the project file).

-- bruce (sqlwork.com)

tshad wrote:
I have a VS 2008 project that is going to create a Class Library.

Can I use both C# and VB files to create this?

I have 3 classes that are in C# and 4 that are in VB and would like to put
them in the same library.

If not, I will create 2. But if I create 2 .dlls can they use the same
namespace?

Thanks,

Tom

Sep 14 '08 #7
re:
!What about what Juan said about the App_Code folders
!and using it to created one dll with different languages?

I didn't say that, at least in reference to MSIL.

I said you can use both languages and that you can use the
same namespace even though you're using using both languages.

In sum :

1. You will wind up with different dlls for vb and c#.
2. You can use the same namespace in both
3. The MSIL in both dlls will be merged into the page's dll in the temp files directory.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"tshad" <tf*@dslextreme.comwrote in message news:eD**************@TK2MSFTNGP04.phx.gbl...
David Anton wrote:
>You can't create a single dll that is coded in different languages.
Either create two dll's or convert the source code to a single
language.
Now I am confused.

What about what Juan said about the App_Code folders and using it to created one dll with different languages?

Thanks,

Tom
>>I have a VS 2008 project that is going to create a Class Library.

Can I use both C# and VB files to create this?

I have 3 classes that are in C# and 4 that are in VB and would like
to put them in the same library.

If not, I will create 2. But if I create 2 .dlls can they use the
same namespace?

Thanks,

Tom


Sep 15 '08 #8
re:
!That isn't a dll though...

If you use code subdirectories for VB and C#...

1. You will wind up with different dlls for vb and c#.
2. You can use the same namespace in both
3. The MSIL in both dlls will be merged into the page's dll in the temp files directory.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"David Anton" <Da********@discussions.microsoft.comwrote in message
news:7F**********************************@microsof t.com...
That isn't a dll though...
--
http://www.tangiblesoftwaresolutions.com
C++ to C#
C++ to VB
C++ to Java
VB & C# to Java
Java to VB & C#
Instant C#: VB to C#
Instant VB: C# to VB
Instant C++: VB, C#, or Java to C++/CLI
"Mark Rae [MVP]" wrote:
>"tshad" <tf*@dslextreme.comwrote in message
news:eD**************@TK2MSFTNGP04.phx.gbl...
David Anton wrote:
You can't create a single dll that is coded in different languages.
Either create two dll's or convert the source code to a single
language.

Now I am confused.

What about what Juan said about the App_Code folders and using it to
created one dll with different languages?

Juan is correct:
http://pietschsoft.com/post/2006/03/...de-folder.aspx
--
Mark Rae
ASP.NET MVP
http://www.markrae.net


Sep 15 '08 #9

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

Similar topics

1
by: Cindy | last post by:
On Thu, 3 Jul 2003 17:23:22 +0800, "Cindy" <stayhardsg@yahoo.com.sg> wrote: >Would appreciate if someone could point me to a website to find a javascript >that could perform the following: >...
2
by: maddog | last post by:
My works are done in vs.net. I wanna take a look at vs.net2003. any suggestion are welcome. thanks. -- maddog
2
by: faktujaa | last post by:
Hi, I have created an application that uses IIS to host remote components. All the remote components are listed in app.config in client and web.config in server. Now the app.config can contain...
1
by: Bob N5 | last post by:
I am working on an application that uses interop to do some simple operations with both Excel and Word. I have most of functionality working, but ran into issues on making things work with both...
17
by: Mark A | last post by:
DB2 8.2 for Linux, FP 10 (also performs the same on DB2 8.2 for Windoes, FP 11). Using the SAMPLE database, tables EMP and EMLOYEE. In the followng stored procedure, 2 NULL columns (COMM) are...
102
by: BoogieWithStu22 | last post by:
I am running into a problem with a web page I have created when viewing it in IE6 on some machines. The page has a database lookup. The user enters an account name or number and clicks a lookup...
4
by: Jim Carlock | last post by:
I'm working with three column layouts without tables. The page in question... http://www.microcosmotalk.com/images/garden/vine.asp Using clear:both; causes problems in the left and right...
14
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
2
by: rjmckay | last post by:
At work (with restricted permissions) ... I share a desk with another person. I have a USB hub that both of us hook our headphones up to. The problem is, that sound doesn't go to both...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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.