Jose R. Guay Paz

Most of the time on
ASP.NET, C# & SQL Server

Sponsors

News

INETA Community Speakers Program

My latest tweets

this.blog.owner=

  • CSW Solutions
  • Follow Me
  • Works On My Machine

.NET Communities

  • INETA Latam

Blogs I Read

Websites I like

The ASP.NET Capsule #18: Running C# & VB.NET in the same web application

Hi all.

You know, sometimes you just find some code on the Internet or a colleague handed out a piece of code written in a language other than the one you use.

Well, fear no more. Just modify your Web.Config file to include the other compiler and off you go.

<system.codedom>
<
compilers>

<compiler language="c#;cs;csharp" extension=".cs"  type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
     <
providerOption name="CompilerVersion" value="v3.5" />
     <
providerOption name="WarnAsError" value="false" />
</
compiler>

<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
     <
providerOption name="CompilerVersion" value="v3.5" />
     <
providerOption name="OptionInfer" value="true" />
     <
providerOption name="WarnAsError" value="false" />
</
compiler>

</compilers>
</
system.codedom>

 

Enjoy!



Comments

The ASP.NET Capsule #18: Running C# & VB.NET in the same web application | ASP Scribe said:

Pingback from  The ASP.NET Capsule #18: Running C# &amp; VB.NET in the same web application | ASP Scribe

# August 3, 2009 11:28 AM

The ASP.NET Capsule #18: Running C# & VB.NET in the same web application | rapid-DEV.net said:

Pingback from  The ASP.NET Capsule #18: Running C# &amp; VB.NET in the same web application | rapid-DEV.net

# August 3, 2009 12:11 PM

Running vb.net alongside c# in a web app « Shawson's Code Blog said:

Pingback from  Running vb.net alongside c# in a web app &laquo; Shawson&#039;s Code Blog

# August 4, 2009 6:42 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)