Hybrid Project

A

A.M

Hi,

Can I have both C# and VB.NET pages/modules in a visual studio.net project?

Thanks,
Ali
 
S

Steve C. Orr [MVP, MCSD]

Currently you can use multiple languages within a solution, but only one
language per project.
Things should get even more flexible in .NET 2.0.
 
G

George Durzi

I did this once when I was playing with the Beta version of VS.NET. If I
recall correctly, I had a C# web project, and a VB.NET one. I copied a
vb.net webform, along with its codebehind into the C# project, and added it
to the project. Everything seemed to work well
 
S

Steven Cheng[MSFT]

Hi Ali,


Thanks for posting in the community! My name is Steven, and I'll be
assisting you on this issue.
From your description, you'd like to know whether it's possible to have
both C# and VB.NET pages/modules in a visual studio.net project? Or in
other words whether it possible to use multi language to develop in the
same project?
If there is anything I misunderstood, please feel free to let me know.

As for this problem, here is my suggestions:
Generally, the dotnet support multi-languages, that "Multi-language" is
based on component level(assembly level) colaboration. For example, we use
C# to build a .net component and then use it in a VB.NET project and also
the contrary. And normally as others' suggestion, we can build a solution
and create multi projects developed under different lanugage such as C# ,
VB.NET or c++ ... to generate the different parts of components of a whole
big solution. But as for the "VB.NET pages/modules in a visual studio.net
project", I think it is something like use multi language to develop a
single .net project. This is not recommended or supported by the dotnet
development documenation. Also, I think there'll occur some unexcepted
errors if you do such operations in a certain .net project within VS.NET.
So I recommend that you consider the assembly level component
colaboration(using multi-languages to develop components in separate
projects) in a certain solution. How do you think of it?

In addtion, here is tech articles on using multi-language and component
developing in dotnet development:

#HOW TO: Manage Multi-Project Solutions in Visual Studio .NET
http://support.microsoft.com/?id=317786

#HOW TO: Manage Multilanguage Web Forms Solutions in Visual Studio .NET
http://support.microsoft.com/?id=315903

#Design Guidelines for Class Library Developers
http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconNETFrameworkDesig
nGuidelines.asp?frame=true

Hope they are helpful to you.
Please check out my suggestion. If you have any questions, please feel free
to post here.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
A

A.M

Thanks Steven for reply.

It seems multiple language involves some hassles, so i am going to invest
some time and translate the project to C#.

Ali
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top