Visual Studio 2012 csc.exe Error. Executable not valid for OS

后端 未结 10 2013
离开以前
离开以前 2020-12-20 14:21

I am getting the following error when trying to compile and test any type of project in Visual Studio 2012 Professional.

Error 1 The specified task executable \

相关标签:
10条回答
  • 2020-12-20 14:33

    I solved my problem by copying the whole folder containing my visual studio solution From C:\Users\me\Google Drive... To: C:\Users\me\OneDrive...

    0 讨论(0)
  • 2020-12-20 14:35

    I think this problem is caused due to improper PC clean up. I was running Quick Heal PCTuner 3.0 software on a 64-bit windows 7 machine but suddenly due to loss of power my machine was shut down then when i opened it again I was getting this problem in VS 2013. Even TortoiseSVN checkout was not working and throwing internal error and something like corrupted disk also was shown when trying to delete some files on the harddisk.

    I ran the PC Tuner again doing the Disk, Registry and traces clean up and it got fixed. maybe this problem may occur due to other cases also but is mostly related to the system's files In my case this is the fix

    Regards.

    0 讨论(0)
  • 2020-12-20 14:38

    On Visual Studio 2013, the same problem solved by doing this for me: Right click the solution and open Configuration Manager. For the project(you may see at least one there), I've changed the Platform from Any CPU to x86 for the project that may causing the problem.

    0 讨论(0)
  • 2020-12-20 14:39

    I had this exact problem today on my Win7 Machine. As Hans suggests, 'Navigate to C:\Windows\Microsoft.NET\Framework\v4.0.30319 and type "csc".'

    The file may still exist but if you can open it with notepad, it will probably show just plain text of some errors. This is the indication that your compiler has been destroyed. At my office we have come up with a theory that a Windows update may be causing this because only a few machines have been affected, but I haven't read much online about it until now.

    We fixed this by copying someone else's csc.exe into the C:\Windows\Microsoft.NET\Framework\v4.0.30319 directory and recompiling. Be sure to set the options on the file to read-only so this won't happen again. Good Luck!

    0 讨论(0)
  • 2020-12-20 14:40

    in my case helped (I had .net framework 4.5.1 and vs c# 2010 express): download the newest .net framework and run repair

    0 讨论(0)
  • 2020-12-20 14:46

    I've tried to delete and move csc.exe file but it doesn't do anything.

    Then simply I upgrade .net version and than downgrade (returned to its original state) and it works.

    0 讨论(0)
提交回复
热议问题