I encountered this same issue today. A project would not build on my PC but built fine on other PC’s
I eventually fixed it by doing the following:
Right-clicked the project with the error, went into Properties
Selected the Build tab and went to the last option which is “Generate serialization assembly”
I set this to Off and the project now builds fine.