While building my code through command line I get the error:
System.TypeLoadException: Could not load type 'Microsoft.Build.Evaluation.Context.EvaluationContext' from assembly 'Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
I am using Visual Studio 2017 on windows environment.
I have tried
- Restarting all instances of Visual Studio
- Restarting the machine.
- Tried repairing the Visual Studio through Visual Studio Installer.
- Tried to uninstall and reinstall Microsoft.Build.Framework.dll using gacutil. I am still getting the same error.
It would be very helpful if I can get a fix for this. Thanks in advance.