C#的新手-编译问题 [英] New To C# - Compile issue

查看:107
本文介绍了C#的新手-编译问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近安装了Visual Studio Express以学习C#.找不到cse.exe.

我编写了一个小应用程序,并尝试在cmd提示符下进行编译.我收到以下错误.

C:\> csc HelloWorld.cs
无法将"csc"识别为内部或外部命令,可操作程序或批处理文件.


请帮忙!在我失去动力之前! :((:(((

I recentyly installed the Visual Studio Express to learn C#. Cant find the cse.exe.

I worte a small app and tried to complile in cmd prompt. I get the following error.

C:\>csc HelloWorld.cs
''csc'' is not recognized as an internal or external command, operable program or batch file.


PLEASE HELP! Before I loose my motivation! :(( :(

推荐答案

首先,如果您收到这样的错误,请用Google搜索整个错误...参见此处:Google It [ ^ ]

第一个结果说明了遇到该错误时的处理方法.我指的是: C#编程简介-您的第一个应用程序 [
First, if you get an error like that, google the entire error...see here: Google It[^]

The very first result explains what to do if you get that error. I''m referring to: Introduction to C# Programming - Your First Application[^]

You said you downloaded the Visual Studio Express version, but my guess is that is not the same as the .NET SDK. Anyway, see that page above.

[Update]
So, it does look like when you download the .Net Framework, csc.exe is included...under Windows\Microsoft.Net\Framework\v.1.1.4322 (and the other versions so use the latest version) so you probably just need to add it as a PATH environmental variable.


尝试使用.Net命令提示符.

可以在开始">程序">"Visual Studio 20xx">"Visual Studio工具"中找到此方法的快捷方式.

或者转到您的visual studio文件夹并在其中搜索.

*编辑-顺便说一句,您需要获取一本C#书籍并阅读*.
Try using the .Net command prompt.

The short cut to this can be found in Start>Programs>Visual Studio 20xx>Visual Studio Tools.

Alternately go to your visual studio folder and search there.

*Edit - Oh and by the way, you need to get a C# book and read *.


您的问题是c:.exe在C:位置不存在.您需要找到cse.exe所在的驱动器/文件夹位置.在CMD(命令提示符)中,转到存在可执行文件的位置,然后键入csc HelloWorld.cs

从一本好书/教程开始可以帮助您获得自信...
现在,从这里开始:
C#初学者教程 [
Your issue is that csc.exe does not exist in C: location. You need to locate the drive/folder location where the cse.exe is located. In CMD(command prompt), Go to that location where the executable file is present and then type the csc HelloWorld.cs

Starting with a good book/tutorial would had helped you in gaining confidence...
For now, start from here:C# Tutorial For Beginners[^]

I would suggest you to use online tutorials to start and gain confidence. No point in starting arbitly and loosing motivation.
:thumbsup:


这篇关于C#的新手-编译问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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