I am getting this weird error on Windows 10 when I try to build any project. The projects are working fine if I build them on other OS.
The specified task executable "cmd.exe" could not be run. The specified executable is not a valid application for this OS platform.
When I tried to check the log I got to the following code in Nuget.targets file inside .nuget folder, I commented the code and the project builds fine now. I don't understand why the error. Any new projects that I create are working fine...
I am using Visual Studio 2013 on Windows 8, Windows Server 2008 and Visual Studio 2015 on Windows 10.
Code:
<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
- What is the reason for this error ?
- Is it because of OS or because of Visual Studio ?
- How do I resolve it? I don't think commenting the code is the way to do it...

%windir%\system32\cmd.exeis working fine...cmd.exeis corrupt for VS if it's working fine...