When we define a property like
public string Name {get; set;}
dot net can make our properties code. but when we use
A more modern scenario for receiving this error is building code that uses C#6 syntax using a version of VisualStudio that is less than VS 2015 (or using MsBuild that is less than 14).
In C#6.0 it is allowable to have autoProperties that do not have a setter (they are assumed to be a private set).
Try compiling with VS2015+ or msbuild 14+ .. or modify the code so that all autoProperties have a setter.