开发者

missing assembly reference

开发者 https://www.devze.com 2022-12-10 22:38 出处:网络
CS0234: The type or namespace name \'ShoppingCart\' does not exist in the namespace \'MyWebsite.Commerce\' (are you missing an assembly reference?)

CS0234: The type or namespace name 'ShoppingCart' does not exist in the namespace 'MyWebsite.Commerce' (are you missing an assembly reference?)

public class ProfileCommon : System.Web.Profile.ProfileBase {

    public virtu开发者_如何学JAVAal MyWebsite.Commerce.ShoppingCart Cart {
        get {
            return ((MyWebsite.Commerce.ShoppingCart)(this.GetPropertyValue("Cart")));
        }
        set {
            this.SetPropertyValue("Cart", value);
        }
    }

    public virtual string Country {
        get {
            return ((string)(this.GetPropertyValue("Country")));
        }
        set {
            this.SetPropertyValue("Country", value);
        }
    }

    public virtual string Gender {
        get {
            return ((string)(this.GetPropertyValue("Gender")));
        }
        set {
            this.SetPropertyValue("Gender", value);
        }
    }

    public virtual int Age {
        get {
            return ((int)(this.GetPropertyValue("Age")));
        }
        set {
            this.SetPropertyValue("Age", value);
        }
    }

    public virtual ProfileCommon GetProfile(string username) {
        return ((ProfileCommon)(ProfileBase.Create(username)));
    }
}

when i run this page the an error occured and when i clicked the error line it goes to above code please anyone help me ASAP please.......


Check your project references - most likely the one that points to the assembly that contains MyWebsite.Commerce.ShoppingCart is missing. Is this a project reference? Perhaps you simply haven't built the solution yet.

0

精彩评论

暂无评论...
验证码 换一张
取 消