How do I fix the “compilerVersion” IIS error?

前端 未结 7 1492
借酒劲吻你
借酒劲吻你 2020-11-28 06:04

I\'m getting this exception:

System.Configuration.ConfigurationErrorsException: The value for the \'compilerVersion\' attribute in the provider opti

7条回答
  •  悲&欢浪女
    2020-11-28 06:30

    I had a similar problem and had to tell ASP.NET in configuration to use the 3.5 compiler as follows by modifying Web.config.

    I've copied and pasted the following from my code. You have to change value="v3.5" to value="v4.0". The compiler type strings might also change.

    
    
      
    
      
        
          
            
            
          
          
            
            
            
          
        
      
    
    
    

    In my case the 2.0 compiler was being used instead of 3.5. I was working in an IIS 7, ASP.NET Website project.

    You might glean additional insight from:

    • System.CodeDom Namespace or
    • compiler Element for compilers for compilation - ASP.NET Settings Schema.

提交回复
热议问题