Tag Archives: VB.Net

Use CS and VB files in App_Code

We all know that App_Code folder contains source code files written as traditional class files — that is, files with a .vb extension, .cs extension, and so on.

But when we keep .cs and .vb file together in one folder and try to build the project it throws errors. So to successfully build the project we follow two simple steps .

Step#1 : Create two folders VBCode for .vb files and CSCode for .cs files.

Step#2:  Modify web.config file.

[code]<compilation>
<codeSubDirectories>
<add directoryName="CSCode"/>
<add directoryName="VBCode"/>
</codeSubDirectories>
</compilation>[/code]

That’s all, Hope this helps.
Enjoy !! 🙂