Severity Code Description Project File Line Suppression State
The solution was to install .NET 3.5 framework on the machine. I was already having the .NET 4.8 framework on my machine.
After installing the .NET 3.5 Framework the problem was gone.
It seems Yahoo.Yui.Compressor needs 3.5 framework for its dlls.