Running vb.net alongside c# in a web app


via The ASP.NET Capsule #18: Running C# & VB.NET in the same web application – Jose R. Guay Paz.

Great snippet to wack in the web.config file, which allows you to run c# and vb.net code (*spit* :P ) in the same web project;


<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>

  1. No comments yet.
(will not be published)