C# Error CS2015 – ‘{0}’ is a binary file instead of a text file

C# Error

CS2015 – ‘{0}’ is a binary file instead of a text file

Reason for the Error & Solution

‘file’ is a binary file instead of a text file

A file was passed to the compiler that was a binary file. The compiler expects a source code file.