Hudson
Hudson

Reputation: 95

Exception message: 'v4.0' is not a valid value for attribute 'system.codedom/compilers/compiler/ProviderOption/CompilerVersion

Am hosting two websites on a single website in IIS6, as parent and child applications.

Parent Application - Built using Umbraco CMS 4.9.0 with .Net Framework version 4.0 as mentioned in web.config Child Application - It is a Blog, which built using Dasblog CMS with .Net framework version 2.0.

As usual, my child application has been inherited from parent application, and it trows the following error "Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive." hence i added the below in parent application's web.config:

<location path="." inheritInChildApplications="false">
 <system.web>
 </system.web>
</location>

once i added the above am getting the following error, "Exception message: 'v4.0' is not a valid value for attribute 'system.codedom/compilers/compiler/ProviderOption/CompilerVersion" to fix this issue i went this all the possibilities be referring this link(http://codeasp.net/blogs/raghav_khunger/microsoft-net/2053/the-value-for-the-compilerversion-attribute-in-the-provider-options-must-be-v4-0-or-later), but didn't help!

But, my doubt here is the latest error what am receiving is showing in my Event Viewer's source as ASP.NET 2.0 which makes me think that i should fix this error on child application or parent application.

Please follow the below system.codedom controls which is mentioned in my parent web.config.

<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="v4.0" />
    <providerOption name="WarnAsError" value="false" />
  </compiler>
  </compilers>
 </system.codedom>

Any ASP.NET punter around the globe, please help me, Very honestly am not a programmer, i work in administration part, so if i do missed out anything specifically please explain me like am 6 year old kid.

Thank you very much. Hudson

Upvotes: 0

Views: 1780

Answers (1)

Bryan
Bryan

Reputation: 3667

Change the compiler version to 4.0.0.0

The code below is from here

<system.codedom>
<system.codedom>
 <compilers>
  <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
    type="Microsoft.CSharp.CSharpCodeProvider,System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
   <providerOption name="CompilerVersion" value="v4.0"/>
   <providerOption name="WarnAsError" value="false"/>
  </compiler>
 </compilers>
</system.codedom>

Upvotes: 0

Related Questions