We started getting this error on the production server after deploying the application migrated from 4.6.1 to 4.7.2.
We noticed that the .NET framework 4.7.2 was not installed there. In order to solve this issue we did the following steps:
Installed the .NET Framework 4.7.2 from:
Restarted the machine
Confirmed the .NET Framework version with the help of How do I find the .NET version?
Running the application again with the .Net Framework 4.7.2 version installed on the machine fixed the issue.