Wednesday, December 3, 2008

Compiling C# and VB code together in asp.net

Yesterday i was working on a web application which uses vb classes. I have added a c# class added but asp.net compiler does not compile it as app_code folder becomes a single assembly so it allows only vb or C#.

Tip:
To compile both C# and VB, add this in web.config.

<compilation debug="false">
<codesubdirectories>
<add directoryname="VBCode">
<add directoryname="CSCode">
</add>
</add></codesubdirectories></compilation>


For more information, see this post.

1 comment:

Awais said...

nice blog adeel. keep posting.