从命令提示符编译.cs文件 [英] Compile .cs file from Command Prompt

查看:216
本文介绍了从命令提示符编译.cs文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想编译.cs文件MS-DOS。



我有设置路径变量。 set path =c:\Program Files \ Microsoft Visual Studio 10.0\VC



但是当我使用csc D:\ _sample.cs时,它显示

Hi,

I want to compile .cs file MS-DOS.

I have set path variable. set path="c:\Program Files\Microsoft Visual Studio 10.0\VC"

But when I use csc D:\sample.cs, it is showing

'csc' is not recognized as an internal or external command,
operable program or batch file.





请帮忙。



提前致谢



Please help.

Thanks in advance

推荐答案

请试试这个:



1.在命令提示符下转到此位置

C:\ Windows \winsxs \ x86_netfx35linq-csharp_31bf3856ad364e35_6.1.7601.17514_none_193318f5726bf1d7

2.现在执行以下命令:

csc [.cs文件的FullPath]



希望这个帮助..
Please try this:

1. Go to this location in your command prompt
C:\Windows\winsxs\x86_netfx35linq-csharp_31bf3856ad364e35_6.1.7601.17514_none_193318f5726bf1d7
2. Now execute following command:
csc [FullPath of your .cs file]

Hope this helps..


这是因为CSC.EXE不在该目录中。

相反,请尝试查看:

That's because CSC.EXE is not in that directory.
Instead, try looking in:
C:\Windows\Microsoft.NET\Framework\v4.0.30319

或类似。


更改p来到这个



C:\ Windows \ Microsoftoft.NET\Framework64 \v2.0.50727 //基础64位Os



C:\ Windows\Microsoft.NET\Framework\v2.0.50727 //基本32位Os
Change path to this

C:\Windows\Microsoft.NET\Framework64\v2.0.50727 //Base 64 bit Os

C:\Windows\Microsoft.NET\Framework\v2.0.50727 //Base 32 bit Os


这篇关于从命令提示符编译.cs文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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