什么是C#编译器,怎么使用csc xxx.cs 进行调试?

chengrg 2003-08-22 07:58:23
谢谢
...全文
131 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
cppTrier 2003-08-29
  • 打赏
  • 举报
回复
C#的编译器位于 C:\WINNT\Microsoft.NET\Framework\v1.1.4322\

你可以在windows的环境变量里设置 Path = C:\WINNT\Microsoft.NET\Framework\v1.1.4322\
这样就可以在命令行模式下编译C#程序了。

设置环境变量的方法:
控制面板->系统->高级->环境变量
chengrg 2003-08-29
  • 打赏
  • 举报
回复
非常感谢!
我是新手,都不知道上面的东东写在什么地方,能说怎么做吗?
tongzhenhua 2003-08-22
  • 打赏
  • 举报
回复
用vs.net自带的命令行方式。

要么自己写这个批处理来设定路径吧
123.bat
%comspec% /k "C:\123.bat"

@SET VSINSTALLDIR=D:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE
@SET VCINSTALLDIR=D:\Program Files\Microsoft Visual Studio .NET 2003
@SET FrameworkDir=C:\WINNT\Microsoft.NET\Framework
@SET FrameworkVersion=v1.1.4322
@SET FrameworkSDKDir=D:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1
@rem Root of Visual Studio common files.

@if "%VSINSTALLDIR%"=="" goto Usage
@if "%VCINSTALLDIR%"=="" set VCINSTALLDIR=%VSINSTALLDIR%

@rem
@rem Root of Visual Studio ide installed files.
@rem
@set DevEnvDir=%VSINSTALLDIR%

@rem
@rem Root of Visual C++ installed files.
@rem
@set MSVCDir=%VCINSTALLDIR%\VC7

@rem
@echo Setting environment for using Microsoft Visual Studio .NET 2003 tools.
@echo (If you have another version of Visual Studio or Visual C++ installed
and wish
@echo to use its tools from the command line, run vcvars32.bat for that
version.)
@rem

@REM %VCINSTALLDIR%\Common7\Tools dir is added only for real setup.

@set
PATH=%DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\C
ommon7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDi
r%\bin;%FrameworkDir%\%FrameworkVersion%;%PATH%;
@set
INCLUDE=%MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\PlatformSDK\inc
lude\prerelease;%MSVCDir%\PlatformSDK\include;%FrameworkSDKDir%\include;%INC
LUDE%
@set
LIB=%MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib\prerelease;
%MSVCDir%\PlatformSDK\lib;%FrameworkSDKDir%\lib;%LIB%

@goto end

:Usage

@echo. VSINSTALLDIR variable is not set.
@echo.
@echo SYNTAX: %0

@goto end

:end

110,536

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧