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

Mixing VB & C# in the same DLL

gg
Hi,

I'm sure this must be one of the most popular questions...

I've developed the application in VB and have some C# code which I want to
incorporate. Visual Studio seems to allow you either a VB or C# project,
neither of which can contain files from the other language. The official
method of combining languages is to create two projects under the same
solution, one for the VB code, one for the C# code. This seems pants.

How do you mix VB and C# AND compile into a SINGLE dll?
TIA,
Glenn
Nov 18 '05 #1
11 1470
"gg" <a@b.c> wrote in message news:co**********@thorium.cix.co.uk...
How do you mix VB and C# AND compile into a SINGLE dll?


You don't - you wait for VS.NET 2005...
Nov 18 '05 #2

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:uK**************@TK2MSFTNGP12.phx.gbl...
"gg" <a@b.c> wrote in message news:co**********@thorium.cix.co.uk...
How do you mix VB and C# AND compile into a SINGLE dll?


You don't - you wait for VS.NET 2005...


And then wait for VS 2007 - 'cos they forgot to add something else, then
wait for VS 2009 'cos they forgot to add something else.....

It's never ending. Why don't we all just send Microsoft our first born and
get on with it.

Just as a point, I'm still developing stuff with VS2002 -- I couldn't see
the point in paying those scumbags any money for 'new features' that I don't
need. In any case, they should have released VS2003 as a service pack.
Glenn
Nov 18 '05 #3
"Glenn" <So************@dev.null> wrote in message
news:co**********@thorium.cix.co.uk...
How do you mix VB and C# AND compile into a SINGLE dll?
You don't - you wait for VS.NET 2005...


And then wait for VS 2007 - 'cos they forgot to add something else, then
wait for VS 2009 'cos they forgot to add something else.....


Yeah - they got the internal combustion engine right at the first attempt...
It's never ending. Why don't we all just send Microsoft our first born
and get on with it.


You are, truly, a cretin.
Nov 18 '05 #4
> You are, truly, a cretin.
I see. So by actually questioning the basis of what MS has to offer makes
me an idiot?

I guess you would have voted for Bush's second term given the chance?

Now, to answer my original question, we can do the linking into a single
DLL. It looks as if an open source utility (that's a non MS one, so it
*must* be crap to certain people): NAnt is a free .NET build tool. In
theory it is kind of like make without make's wrinkles.
http://nant.sourceforge.net/

Pity MS couldn't develop VS to do this in the first place as it would make
the cross-over from VB to C# or back much easier for all of us.
Glenn
Nov 18 '05 #5
"Glenn" <So************@dev.null> wrote in message
news:co**********@thorium.cix.co.uk...
I guess you would have voted for Bush's second term given the chance?


I rejoice every day in the fact that I'll never be eligible to vote in an
American election...
Nov 18 '05 #6
> And then wait for VS 2007 - 'cos they forgot to add something else, then
wait for VS 2009 'cos they forgot to add something else.....

It's never ending. Why don't we all just send Microsoft our first born and get on with it.
Only a poor developer blames the development software for their own
limitations. I can remember writing C programs using a shareware
command-line compiler that used Kernigan-Ritchie C code. Don't ever remember
complaining about the compiler software, though. Didn't seem helpful to the
task.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Glenn" <So************@dev.null> wrote in message
news:co**********@thorium.cix.co.uk...
"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:uK**************@TK2MSFTNGP12.phx.gbl...
"gg" <a@b.c> wrote in message news:co**********@thorium.cix.co.uk...
How do you mix VB and C# AND compile into a SINGLE dll?
You don't - you wait for VS.NET 2005...


And then wait for VS 2007 - 'cos they forgot to add something else, then
wait for VS 2009 'cos they forgot to add something else.....

It's never ending. Why don't we all just send Microsoft our first born

and get on with it.

Just as a point, I'm still developing stuff with VS2002 -- I couldn't see
the point in paying those scumbags any money for 'new features' that I don't need. In any case, they should have released VS2003 as a service pack.
Glenn

Nov 18 '05 #7
I know I shouldn't feed the trolls. But, you didn't by any chance notice
that at least one microsoft employee contributed code to NAnt did you? Also,
I've seen multiple MS employees discuss NAnt and NUnit as useful tools.
Nov 18 '05 #8
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...

Kevin,
Only a poor developer blames the development software for their own
limitations.


Don't even bother - some idiots will never be happy....
Nov 18 '05 #9
I don't know if it is possible to have both languages at the same dll
and use classes, but it is possible if you interested to have at the
same project .aspx pages with both languages.

"gg" <a@b.c> wrote in message news:<co**********@thorium.cix.co.uk>...
Hi,

I'm sure this must be one of the most popular questions...

I've developed the application in VB and have some C# code which I want to
incorporate. Visual Studio seems to allow you either a VB or C# project,
neither of which can contain files from the other language. The official
method of combining languages is to create two projects under the same
solution, one for the VB code, one for the C# code. This seems pants.

How do you mix VB and C# AND compile into a SINGLE dll?
TIA,
Glenn

Nov 18 '05 #10
Hmm, not that this is worth much, but it seems there's been some
misunderstandings. It must be my fault for not writing more clearly.

As a VB developer, I've got some code which is in C#. Of course I could
port this code to VB, but it's rather defeating the object.

A couple of years ago I saw a demo at TechEd showing mixed code and thought
this might be trivially easy. It turns out that you have to mess around
creating projects for each language and that it compiles down to multiple
dlls. Sure, this works, but not as expected.

Hence, I feel it's reasonable to criticise VS for not allowing mixed code
as that is what was demonstrated.

So that leaves me with two choices; accept the status quo and compile to
two DLLs, or wait for VS 2005.

The final criticism of VS 2003 is that some JavaScript debugging features
have been removed. It is possible to get more debugging info from VS 2002,
particularly about the state of JS objects. As I don't need the additional
XML and other features of VS 2003, I don't need to use it.

I guess if that makes me an idiot, well, I guess that makes an idiot of
everyone.
Have a nice day,
Glenn
Nov 18 '05 #11
Oh, and one other thing...

Many of the ISP hosts that my customers use still *only* support v1.0 of the
framework. If I develop using v1.1 (VS2003), I might end up using a
feature that's not backward compatible.

Being prudent isn't being a dinosaur, it's being pragmatic.
Glenn
Nov 18 '05 #12

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

Similar topics

3
by: bergel | last post by:
Hello, Does anyone already have some experience in mixing AWT and Swing? Is it conceptually doable? Does the design of Swing prevent interaction between an AWT and a Swing widget? Regards,...
6
by: Russell E. Owen | last post by:
At one time, mixing for x in file and readline was dangerous. For example: for line in file: # read some lines from a file, then break nextline = readline() # bad would not do what a naive...
0
by: Erik Max Francis | last post by:
Is there any prohibition against mixing different protocols within the same pickle? I don't see anything about this in the Python Library Reference and, after all, the pickle.dump function takes a...
4
by: Rudolf | last post by:
Is it possible to add a vb.net source code module to a c# project and if so how? Thanks Rudolf
1
by: Marc Cromme | last post by:
I would like to ask a question about (good ?) style and possibilities in mixing C FILE* and C++ file streams. The background is that I want to use the C libpng library from within C++, but I...
4
by: Cristian Tota | last post by:
Hi, I'd appreciate any thoughts on mixing C++ and C code. I have a project that uses a given C interface, the rest of the project can be either in C or C++. What would be the recomended design...
2
by: Dan | last post by:
Hi What are the dangers of mixing asp and asp.net? For the .net part of the site i will need to use the global.asax file but for the asp parts it will be using the other global. file, is there...
1
by: Andy | last post by:
Can I mix wide and narrow character output to stdout? I seem to remember hearing this was not supported before but I can't find any reference to such a restriction now I actually need to do it! It...
0
by: dhruba.bandopadhyay | last post by:
I know that it's possible to mix ASP & ASP.NET 1.1 in the same website/application so long as they are in separate frames (iframes). This also holds for mixing ASP & ASP.NET 2.0 pages. But what I...
28
by: ziman137 | last post by:
Hello all, I have a question and am seeking for some advice. I am currently working to implement an algorithmic library. Because the performance is the most important factor in later...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.