Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight error The type or namespace name 'MatchTimeoutInMilliseconds' could not be found

After Windows 10 update 1511 I try build my existing silverlight project and get this error

The type or namespace name 'MatchTimeoutInMilliseconds' could not be found (are you missing a using directive or an assembly reference?) for Web project generated file ProjectName.Web.g.cs

[DataMember()]
        [Display(Name="UserNameLabel", Order=0, ResourceType=typeof(RegistrationDataResources))]
        [RegularExpression("^[a-zA-Z0-9_]*$", ErrorMessageResourceName="ValidationErrorInvalidUserName", ErrorMessageResourceType=typeof(ValidationErrorResources), MatchTimeoutInMilliseconds=-1)]
        [Required(ErrorMessageResourceName="ValidationErrorRequiredField", ErrorMessageResourceType=typeof(ValidationErrorResources))]
        [StringLength(255, ErrorMessageResourceName="ValidationErrorBadUserNameLength", ErrorMessageResourceType=typeof(ValidationErrorResources), MinimumLength=4)]
        public string UserName
        {
            get
            {
                return this._userName;
            }
            set
            {
                if ((this._userName != value))
                {
                    this.OnUserNameChanging(value);
                    this.RaiseDataMemberChanging("UserName");
                    this.ValidateProperty("UserName", value);
                    this._userName = value;
                    this.RaiseDataMemberChanged("UserName");
                    this.OnUserNameChanged();
                }
            }
        }

I haven't this error before I install update 1511. I use Visual studio 2015 pro with update 1 anybody know how to fix this?

like image 286
Std_Net Avatar asked Nov 20 '15 07:11

Std_Net


2 Answers

Ok I found a "BAD" workaround.

In the "Services/UserRegistrationService.cs" in the project.web code, comment out the "[RegularExpression(...)]" for CreateUser, RegistrationData.UserName, RegistrationData.Email.

From what I can tell they changed the why the code is generated. If you have older copies of generated code you will find this property does not exist.

you can look here for the on-going issue. https://connect.microsoft.com/VisualStudio/feedback/details/2031887/generated-code-for-silverlight-references-matchtimeoutinmilliseconds-which-does-not-exist

like image 113
John Hughes Avatar answered Nov 05 '22 21:11

John Hughes


Open RIA Services released a fix today for this http://openriaservices.codeplex.com/workitem/84

like image 28
Rob J Avatar answered Nov 05 '22 20:11

Rob J