新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论.NET,C#,ASP,VB技术
    [返回] 中文XML论坛 - 专业的XML技术讨论区计算机技术与应用『 Dot NET,C#,ASP,VB 』 → 命令行环境学习C# 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 2829 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: 命令行环境学习C# 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     admin 帅哥哟,离线,有人找我吗?
      
      
      
      威望:9
      头衔:W3China站长
      等级:计算机硕士学位(管理员)
      文章:5255
      积分:18406
      门派:W3CHINA.ORG
      注册:2003/10/5

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给admin发送一个短消息 把admin加入好友 查看admin的个人资料 搜索admin在『 Dot NET,C#,ASP,VB 』的所有贴子 点击这里发送电邮给admin  访问admin的主页 引用回复这个贴子 回复这个贴子 查看admin的博客楼主
    发贴心情 命令行环境学习C#


    发信人: zj945 (活着,暂时), 信区: DotNET        
    标  题: 命令行环境学习C#
    发信站: BBS 水木清华站 (Wed May 21 16:44:14 2003), 转信

    大概有不少人都和我一样,初学时不喜欢重磅炸弹一样的大型IDE环境
    而且网上命令行学习c#的文章挺琐碎,所以我在这里整理一下程序,方便大家

    一、安装

    准备工作,该打的sp都打好,
    MS要求win2k安装 Service Pack 3
    NT 4.0 要Service Pack 6a
    iis要5.0或者更高版本
    然后到MS网站上下载安装

    1)安装 Microsoft .NET Framework Redistributable Package
    dotnetfx.exe 20多M,
    安装所需的硬盘空间:160 MB
    所需的硬盘空间:70 MB
    这是.NET应用程序的运行环境

    2)安装.NET Framework SDK
    setup.exe 100多M
    安装所需的硬盘空间:600 MB
    所需的硬盘空间:370 MB
    这是开发环境、文档和例子

    3)安装.NET Framework Language Pack (可选)
    langpack.exe 1M多
    网站上的说明:NET Framework 语言包包含翻译为非英语语言的文本,如错误信息之类
    的文本。在非英语操作系统中运行 .NET Framework 应用程序并不需要安装语言包;但
    是,如果您想用英语之外的一种语言查看 .NET Framework UI 资源,就需要这种语言的
    语言包了。在一台计算机上可以安装多个语言包,每种语言一个语言包。

    二、环境变量设置

    假定你将.net framework安装在E盘,在E:\Program Files\Microsoft.NET\SDK\v1.1\B
    in目录下会有个环境变量批处理文件sdkvars.bat,将它加到你的系统环境变量中或者在
    每次打开console时加载。我本人习惯后者,方法是复制一个console的快捷方式到桌面
    ,右键点击,在属性中将目标该为%SystemRoot%\system32\cmd.exe /k 地址\sdkvars.
    bat;起始目录可以填入平时存放代码的目录 。因为在这里不支持长文件名,为方便起
    见我一般将sdkvars.bat复制一份为csharp.bat到根目录,所以目标中填入%SystemRoot
    %\system32\cmd.exe /k e:\sdkvars.bat。这样以后每次双击图标,就可以在命令行工
    作了。

    三、命令行工具使用

    用文本编辑器编辑好你的程序,然后用命令行编译之类
    关于命令行的使用,下面是OReilly有本书的一段,够用了
    The .NET Framework SDK contains many useful programming tools. Here, in an a
    lphabetical list,are those we have found most useful or necessary for develo
    ping C# applications. Unless otherwise noted, the tools in this list can be  
    found either in the \bin directory of your .NET Framework SDK installation o
    r in the %SystemRoot%\Microsoft.NET\Framework\VERSION directory (replace VER
    SION with the framework version). Once the .NET Framework is installed, you  
    can access these tools from any directory. To use any of these tools, invoke
    a Command Prompt window and enter the name of the desired tool. For a compl
    ete list of the available command-line switches for any given tool, enter th
    e tool name (e.g., csc) and press the Return or Enter key.

    ADepends.exe: assembly dependency list
    Adepends displays all assemblies that a given assembly is dependent on to lo
    ad. This is a useful C# program found among the samples in the \Tool Develop
    ers Guide directory beneath the .NET Framework or Visual Studio .NET directo
    ry tree. You need to install these samples before you can use them, because  
    they are not installed by default.

    Al.exe: assembly linking utility
    Creates an assembly manifest from the modules and resources files you name.  
    You can also include Win32 resources files. Here's an example:
    al /out:c.dll a.netmodule b.netmodule

    CorDbg.exe : runtime debugger
    General source-level, command-line debug utility for MSIL programs. Very use
    ful tool for C# source debugging. Source for cordbg is available in the \Too
    l Developers Guide directory.

    Csc.exe: C# compiler
    Compiles C# sources and incorporates resource files and separately compiled  
    modules.Also allows you to specify conditional compilation options, XML docu
    mentation, and path information. Here are some examples:
    csc foo.cs /r:bar.dll /win32res:foo.res
    csc foo.cs /debug /define:TEMP

    DbgClr.exe: GUI debugger
    Windows-based, source-level debugger. Available in the \GuiDebug directory o
    f the .NET Framework SDK installation.

    GACUtil.exe: global assembly cache utility
    Allows you to install, uninstall, and list the contents of the global assemb
    ly cache. Here's an example:
    gacutil /i c.dll

    ILAsm.exe: MSIL assembler
    Creates MSIL modules and assemblies directly from an MSIL textual representa
    tion.

    ILDasm.exe : MSIL disassembler
    Disassembles modules and assemblies. The default is to display a tree-style
    representation, but you can also specify an output file. Here are some examp
    les:
    ildasm b.dll
    ildasm b.dll /out=b.asm

    InstallUtil.exe: installer utility
    Executes installers and uninstallers contained within the assembly. A logfil
    e can be written, and state information can be persisted.

    Ngen.exe: native image generator
    Compiles an assembly to native code and installs a native image in the local
    assembly cache. That native image is used each time you access the original
    assembly, even though the original assembly contains MSIL. If the runtime c
    an't locate the native image,it falls back on JIT compilation. Here are some
    examples:
    ngen foo.exe
    ngen foo.dll

    nmake.exe: make utility
    Common utility that scripts building of multiple components and source files
    and tracks rebuild dependency information. See Appendix E for more informat
    ion.

    PEVerify.exe: portable executable verifier
    Verifies that your compiler has generated type-safe MSIL. C# will always gen
    erate typesafe MSIL. Useful interop with ILASM-based programs.

    RegAsm.exe: register assembly tool
    Registers an assembly in the system registry. This allows COM clients to cal
    l managed methods. You can also use it to generate the registry file for fut
    ure registration. Here's an example:
    regasm /regfile:c.reg c.dll

    RegSvcs.exe : register services utility
    Registers an assembly to COM+ 1.0, and installs its typelib into an existing
    application. Can also generate a typelib. Here's an example:
    regsvcs foo.dll /appname:comapp /tlb:newfoo.tlb

    Sn.exe : shared name utility
    Verifies assemblies and their key information. Also generates key files. Her
    e's an
    example:
    sn -k mykey.snk

    SoapSuds.exe: SoapSuds utility
    Creates XML schemas for services in an assembly and creates assemblies from  
    a schema. You can also reference the schema via its URL. Here's an example:
    soapsuds -url:http://localhost/myapp/app.soap?wsdl-os:app.xml

    TlbExp.exe : type library exporter
    Exports a COM typelib derived from the public types within the supplied asse
    mbly. Differs from regasm in that it doesn't perform any registration. Here'
    s an example:
    tlbexp /out:c.tlb c.dll

    TlbImp.exe: type library importer
    Creates a managed assembly from the supplied COM typelib, mapping the type
    definitions to .NET types. You need to import this new assembly into your C#
    program for use. Here's an example:
    tlbimp /out:MyOldCom.dll MyCom.tlb

    Wsdl.exe: web services description language tool
    Creates service descriptions and generates proxies for ASP.NET web-service m
    ethods.See the ASP.NET documentation in the .NET Framework SDK for more detail on w
    eb services.

    WinCV.exe : windows class viewer
    Searches for matching names within a supplied assembly. If none are supplied
    , it uses the default libraries. The namespaces and classes are displayed in
    a listbox, and the selected type information is displayed in another window
    .

    Xsd.exe : XML schema definition tool
    Generates XML schemas from XDR, XML files, or class information. Can also ge
    nerate DataSet or class information from a schema. Here's an example:
    xsd foo.xdr
    xsd bar.dll

    四、学习材料

    .net framework附带的documentation,samples,QuickStart Tutorials都是很好的学习
    材料。除此之外,网上还有很多不错的C#书籍,因为只用命令行学习,所以下面列举了
    几本书基本都不需要VS.net的好书;而且,更让人谢天谢地的是这几本书在网上都有英
    文版电子书,也省去了大家花大把银子买书回家,还要费力把书上的中文做反向工程的
    痛苦。

    [OReilly] CSharp Essentials
    书很薄,特别适合C/C++程序员
    简单纲要,不涉及VS.net环境

    [OReilly] Programming CSharp 2E
    涉及VS.net

    [Prentice Hall] Thinkin CSharp
    网上没书评,根据java和c++看可能是重理念的书

    [MS Press] Inside CSharp
    微软这个系列的书都是不错的入门书
    让你的学习曲线变的比较平滑

    [MS Press] Programming.Microsoft.Windows.with.C#
    Charles Petzold的全书,肯定是可以放在手边常翻常看的



    ※ 来源:·BBS 水木清华站 smth.org·[FROM: 218.242.201.168]
    返回上一页
    回到目录
    回到页首
    下一篇


       收藏   分享  
    顶(0)
      




    ----------------------------------------------

    -----------------------------------------------

    第十二章第一节《用ROR创建面向资源的服务》
    第十二章第二节《用Restlet创建面向资源的服务》
    第三章《REST式服务有什么不同》
    InfoQ SOA首席编辑胡键评《RESTful Web Services中文版》
    [InfoQ文章]解答有关REST的十点疑惑

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2004/11/9 2:25:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 Dot NET,C#,ASP,VB 』的所有贴子 点击这里发送电邮给Google AdSense  访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/5/10 10:55:00

    本主题贴数1,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    93.750ms