生成代码中的asp.net编译器错误

时间:2012-11-22 20:15:42

标签: asp.net compilation

我即将为此疯狂。我试图清理和重建,但我一直收到这个错误。

我不知道该怎么做。

你会建议什么?

  

描述:编译资源期间发生错误   需要为此请求提供服务。请查看以下具体内容   错误详细信息并适当修改源代码。

错误讯息:

  

编译器错误消息:CS0234:类型或命名空间名称' Intor32'   命名空间中不存在'系统' (你错过了一个集会吗?   引用?)

文件中的

Line 1:    //-------------------------------------------------------------------------
Line 2:    // <auto-generated>
Line 3:    //     This code was generated by a tool.
Line 4:    //     Runtime Version:4.0.30319.18010
Line 5:    //
Line 6:    //Changes to this file may cause incorrect behavior and will be lost if
Line 7:    //     the code is regenerated.
Line 8:    // </auto-generated>
Line 9:    //----------------------------------------------------------------------
Line 10:   
Line 11:   using System;
Line 12:   using System.Web;
Line 13:   using System.Web.Profile;
Line 14:   
Line 15:   
Line 16:   
Line 17:   public class ProfileCommon : System.Web.Profile.ProfileBase {
Line 18:       
Line 19:       public virtual System.Intor32 OperatorId {
Line 20:           get {
Line 21:               return ((System.Intor32)(this.GetPropertyValue("OperatorId")));
Line 22:           }
Line 23:           set {
Line 24:               this.SetPropertyValue("OperatorId", value);
Line 25:           }
Line 26:       }
Line 27:       
Line 28:       public virtual ProfileCommon GetProfile(string username) {
Line 29:           return ((ProfileCommon)(ProfileBase.Create(username)));
Line 30:       }
Line 31:   }
Line 32:   

以前工作正常,我不知道我改变了什么。

我没有引用Intor32(搜索整个解决方案)

2 个答案:

答案 0 :(得分:1)

System.Intor32更改为System.Int32,该文件是如何生成的?

答案 1 :(得分:1)

查看web.config部分的system.web/profile/properties文件。其中一个<add ... />元素将具有type="System.Intor32"属性。将其更改为type="System.Int32",一切都应该没问题。