2

I have taken MVC-4, WEB API template for my project using C#. Now I have few controllers written in C#. Or I can say everything is written in C#. But now what I want is, I want to add web api controller using vb.net (vb) language.

So ultimately I want to have two types of controller (c# and vb) together. I don't want to use any other project for that. I want to add vb lang api controller in the same project.

I hope I'm clear with my requirements. How can I do this?

2
  • 1
    In .NET, you can have a VS solution which has multiple projects in different languages. You can not mix languages in same assembly or project, however. Nov 23, 2015 at 5:32
  • I understand. Thanks.
    – nyks
    Nov 23, 2015 at 6:37

1 Answer 1

0

You cannot have VB and C# web api controller in same project. The language limitation of Visual Studio only allow you to use only one server side language in a project.

This is needed for compiler to identify what type of language need to be compile.

But you can have multiple project in a solution written in different language.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.