Task could not be loaded from assembly
If you are using Windows 10, enable the .net framework 3.5 and if does not allow you to do so, open command prompt and run:
Dism /online /enable-feature /featurename:NetFX3 /All /Source:D:\sources\sxs /LimitAccess
Based on @MaKCbIMKo's answer I installed .Net Framework 3.5 and this fixed my problem.