的Visual Studio 2012 CSC.EXE错误。可执行文件不适用于OS [英] Visual Studio 2012 csc.exe Error. Executable not valid for OS

查看:1250
本文介绍了的Visual Studio 2012 CSC.EXE错误。可执行文件不适用于OS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译并在Visual Studio 2012专业测试任何类型的项目时,收到以下错误。

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

错误1指定的任务可执行文件CSC.EXE无法运行。指定的可执行文件是不是这个操作系统平台的有效应用。

Error 1 The specified task executable "Csc.exe" could not be run. The specified executable is not a valid application for this OS platform.

测试多个建议网上什么都没有固定的问题后。任何人都知道是什么原因造成的?是否有CSC.EXE的新版本,我需要得到的举行?我知道这是编译器只是不知道我需要做什么来解决这个问题。

After testing multiple suggestions online nothing has fixed the problem. Anyone know what is causing this? Is there a new version of Csc.exe I need to get a hold of? I know this is the compiler just not sure what I need to do to fix the problem.

推荐答案

今天我有这个确切的问题在我的Win7机。正如汉斯表明,导航到C:\Windows\Microsoft.NET\Framework\v4.0.30319并输入CSC

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".'

该文件可能仍然存在,但如果你可以用记事本打开它,它可能会表现出一些错误的只是纯文本。这是你的编译器已被摧毁的指示。在我的办公室,我们想出了一个理论,即Windows更新可能会导致此,因为只有几台机器都受到了影响,但我没有看到网上很多关于它到现在为止。

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.

我们通过复制别人的CSC.EXE到C固定这一点。一定要设置在文件的选项为只读所以这不会再发生了。祝你好运!

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!

这篇关于的Visual Studio 2012 CSC.EXE错误。可执行文件不适用于OS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆