SvcUtil / edb does not generate INotifyPropertyChange when installing DotNET 4.5

All but one of the development computers are installed with DotNET 4.5. The latter has 4.0. Only the one with 4.0 generates proxy classes that implement INotifyPropertyChange on all other computers.

According to MSDN / edb supported. http://msdn.microsoft.com/en-us/library/aa347733(v=vs.110).aspx

The switches we use: / o / ct / r / edb / n / noconfig / tcv

This is generated from computer 4.0:

public partial class OrganizationEdition : MyCompany.MyProject.Client.Win.ServiceProxy.UpdateableEntity, System.ComponentModel.INotifyPropertyChanged { private string CommentField; private System.DateTime ValidFromField; private System.Nullable<System.DateTime> ValidToField; [System.Runtime.Serialization.DataMemberAttribute()] public string Comment { get { return this.CommentField; } set { if ((object.Equals(this.CommentField, value) != true)) { this.CommentField = value; this.RaisePropertyChanged("Comment"); } } } 

This is from a computer with 4.5 (with the Windows SDK 7.0A):

 public partial class OrganizationEdition : MyCompany.MyProject.Client.Win.ServiceProxy.UpdateableEntity { private string CommentField; private System.DateTime ValidFromField; private System.Nullable<System.DateTime> ValidToField; [System.Runtime.Serialization.DataMemberAttribute()] public string Comment { get { return this.CommentField; } set { this.CommentField = value; } } 
+7
source share
1 answer

I can’t say why it doesn’t work.

However, I could give you a trick how to get around this. You can use .tt files (T4 templates) to restore missing notifications in property installers in certain classes that exist in your solution at compile time.

An example of how to implement such functionality can be obtained here on Pluralsight and here, on MSDN, more information on the syntax of T4 templates.

+2
source share

All Articles