I faced this problem. I resolved this problem for me.
You must install Microsoft.CSharp
library to your solution from nuget.
You can use Package Manager Console for install Microsoft.CSharp. For example If you want install Microsoft.CSharp 4.7.0 version, you must run this command on the Package Manager Console:
Install-Package Microsoft.CSharp -Version 4.7.0
Nuget link: Microsoft.CSharp