Wednesday, June 20, 2007

Both VB and C# code in the same project

Being stuck in a situation where there was both C# and VB code that needed to be in the same project I was able to find a way to support both (without having to run one through an translator).

Create a vb and cs folder in the App_Code directory (putting the appropriate files in each) and just put the following in your web.config:

<compilation debug="true">
<codesubdirectories>
<add directoryname="vb"></add>
<add directoryname="cs"></add>
</codesubdirectories>
</compilation>

Labels: , , , ,

1 Comments:

Anonymous Tam said...

Keep up the good work.

5:08 AM  

Post a Comment

<< Home